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
subClass = function (source, prototype) { | |
var dummy = new source.constructor; | |
for (var key in prototype) { | |
dummy[key] = prototype[key]; | |
} | |
source.__proto__ = dummy; | |
} |
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
d3.min = function(array, f) { | |
var i = -1, n = array.length, a, b; | |
if (!f) { | |
for (var y = 0; parseInt(array[y]); y++) {} | |
if (y === array.length) return Math.min.apply(Math, array); | |
} | |
// Continue existing logic below |
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
[ '20', '3', '30', '10' ].sort(function (a, b) { | |
return a == b ? 0 : (a < b ? -1 : 1); | |
})[0]; | |
[ 20, 3, 30, 10 ].sort(function (a, b) { | |
return a == b ? 0 : (a < b ? -1 : 1); | |
})[0]; |
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
{ | |
"bold_folder_labels": true, | |
"build_on_save": 0, | |
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme", | |
"close_windows_when_empty": true, | |
"draw_indent_guides": true, | |
"caret_style": "phase", | |
"fallback_encoding": "Greek (ISO 8859-7)", | |
"folder_exclude_patterns": | |
[ |
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
// Select Similar (ctrl shift a) | |
// https://gist.githubusercontent.com/phaistonian/b3737cf05c1b6a61dbb7/raw/1f1ca90f1c72e395cb4d2abfc23315c47dc5c25d/Select%20Similar.sketchplugin | |
/* Based on initial work by Ale Muñoz */ | |
(function(){ | |
var sel = selection[0], all_layers = [[doc currentPage] children]; | |
if (sel) { | |
var query = getIdForElement(sel), type = [sel className], found = 0; |
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 hash = {}; | |
[1,2,3,3,5,1].filter(function (item) { if (hash[item]) return true; hash[item] = false; return 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
{ | |
"parser": "babel-eslint", | |
"ecmaFeatures": { | |
"jsx": true, | |
"modules": true, | |
"classes": true, | |
"generators": 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
{ | |
"bold_folder_labels": true, | |
"build_on_save": false, | |
"caret_style": "phase", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"default": "Default.sublime-theme", | |
"detect_indentation": false, | |
"draw_indent_guides": true, | |
"draw_minimap_border": 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
import Rebase from 're-base'; | |
const endPoint = 'actions'; | |
const firebaseUrl = 'https://firesync.firebaseio.com'; | |
const client = String(Date.now() + Math.random() * 100); | |
const data = []; | |
let initiated = false; | |
const base = Rebase.createClass(firebaseUrl); | |
function firesync (store) { |
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
# Misc related to npm and webpack | |
node_modules | |
build | |
dist | |
webpack-stats.json | |
npm-debug.log | |
# Sublime related - just in case | |
################### | |
sublime-* |
OlderNewer