git remote prune origin
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -df
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"plugins": [ | |
"react" | |
], | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"ecmaFeatures": { | |
"jsx": true, | |
"experimentalObjectRestSpread": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "script" | |
}, | |
"parser": "espree", | |
"env": { | |
"node": true, | |
"es6": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Base Class | |
function Base(p1, p2) { | |
this.x = this.someMethod(p1, p2); | |
this.y = { | |
a: p1, | |
b: p2 | |
}; | |
} | |
Base.prototype.someMethod = funciotn(a, b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function applyNew(constructor, args) { | |
return new (Function.prototype.bind.apply(constructor, [constructor].concat(args)))(); | |
} | |
function callNew(func /*[, arg1[, arg2[, ...]]]*/) { | |
return applyNew(func, ...arguments); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var fs = require('fs'); | |
var spawn = require('child_process').spawn; | |
var through = require('through2'); | |
var browserSync = require('browser-sync'); | |
var reload = browserSync.reload; | |
var gutil = require('gulp-util'); | |
var $ = require('gulp-load-plugins')(); | |
var jshintStylish = require('jshint-stylish'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function byProperty (prop, reverse, primer) { | |
if (typeof reverse === 'undefined') { reverse = false; } | |
if (typeof primer !== 'function') { primer = false; } | |
var key = primer | |
? function(x) {return primer(x[prop]);} | |
: function(x) {return x[prop];}; | |
reverse = [1, -1][+!!reverse]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+!!true === 1; | |
+!!false === 0; | |
-------------------- | |
true === true; | |
false === false; | |
!true === false; | |
!false === true; | |
!!true === true; | |
!!false === false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to menu: | |
Find -> Find in Files... (windows: ctrl+shift+f) | |
Switch on reg_ex button (windows: alt+r) | |
Find: | |
^.*\S+.*$ | |
Where: | |
c:\your_folder\,*.php,*.js,*.inc,*.html,*.htm,*.scss, -*/folder_to_exclude/*, -*.min.js |