Skip to content

Instantly share code, notes, and snippets.

View tushar-borole's full-sized avatar
🎯
Working on React

Tushar Borole tushar-borole

🎯
Working on React
View GitHub Profile
@tushar-borole
tushar-borole / php.ini
Created March 22, 2017 20:09
php storm xbug setting
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.0.15/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.remote_enable=1
@tushar-borole
tushar-borole / test.js
Created March 13, 2017 16:59
Auto Play audio on the page
var audioArray=$( "audio" )
audioArray.each(function( index ,value) {
value.onended = function() {
if(audioArray[index+1]){
audioArray[index+1].play()
}else{
audioArray[0].play()
}
};
value.onplay = function() {
var array = [
1,
5,
10,
15,
20,
25,
30,
35,
40,
@tushar-borole
tushar-borole / image-aspect-ratio.js
Created December 1, 2015 20:14 — forked from jabranr/image-aspect-ratio.js
Set image aspect ratio with JavaScript
/**
* Originally wrote this snippet for Suffragette/Pathé campaign (https://apps.facebook.com/inspiring-women)
*
* The campaign app forms a grid of square images pulled from social APIs based on
* particular hashtags. This snippet sets the new width and
* height based on their natural width and height to maintain the aspect ratio.
* Works best for 1:1 aspect ratio but can be modified to accommodate other ratio.
*
* @param Element|Resource img - An image element/resource from DOM
* @param int expected - Expected width or height
@tushar-borole
tushar-borole / Gruntfile.js
Created November 25, 2015 07:35 — forked from nnarhinen/Gruntfile.js
Support html5 pushState (or angular.js html5mode) in a yeoman (grunt-contrib-connect) application.
module.exports = function (grunt) {
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
//MODIFIED: add require for connect-modewrite
var modRewrite = require('connect-modrewrite');
grunt.initConfig({
//The connect.options.middleware is the relevant part
//Adapted from https://github.com/yeoman/generator-angular/issues/433#issuecomment-37706899
// Generated on 2014-01-30 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
@tushar-borole
tushar-borole / filter-blur.css
Created November 6, 2015 14:09
Cross-browser Filter Blur CSS
filter: blur(5px); /* Someday, sigh ... */
-webkit-filter: blur(5px); /* Prefixed CSS3 blur filters */
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
/* filter: url(#blur); Firefox needs SVG */
filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='10'); /* IE lte 9 */
@tushar-borole
tushar-borole / checkImage.example.js
Created October 15, 2015 11:51 — forked from draeton/checkImage.example.js
Check the existence of an image file at `url` by creating a temporary Image element.
// Example Use
(function () {
function success() {
console.log("success: ", this.src);
}
function failure() {
console.log("failure: ", this.src);
}
@tushar-borole
tushar-borole / traverse.js
Last active July 30, 2024 00:40 — forked from steinfletcher/traverse.js
Object tree traversal in javascript (with lodash)
var data = {
"name": "root",
"contents": [
{
"name": "A",
"contents": [
{
"name": "fileA1",
"contents": []
}

SublimeText3 Valid License without cracking! Just download/install then use this license.

Notice that it may not work on dev builds, but still works on 3083 build!

----- BEGIN LICENSE -----

Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F