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
{ | |
"caret_extra_width": 1, | |
"caret_style": "smooth", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Oceanic Next Color Scheme/Oceanic Next.tmTheme", | |
"copy_with_empty_selection": true, | |
"default_line_ending": "unix", | |
"detect_slow_plugins": false, | |
"drag_text": false, | |
"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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>list</title> | |
<style> | |
.stoppable { | |
background-color: gray; | |
} |
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 throttle2 = function(fn, threshhold, scope) { | |
var time, last = 0, handle, | |
args = arguments; | |
threshhold = threshhold || 250; | |
return function() { | |
var that = this; | |
time = +new Date(); | |
if ((time - last) > threshhold) { | |
last = time; | |
// console.timed_log('ran'); |
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
console.timed_log = function() { | |
var args = Array.prototype.splice.call(arguments, 0); | |
var time = +new Date(); | |
var diff = time - (this._time || time); | |
args.unshift(diff); | |
console.log.apply(console, args); | |
this._time = time; | |
}; |
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 em = function(str, pattern, el) { | |
if (!(str && pattern)) return ""; | |
pattern = pattern.toString().replace((/[^a-zA-Z1-9 ]/ig), "").split(" ").reduce(function(prev, curr){ | |
if(curr){ | |
prev.push(curr); | |
} | |
return prev; | |
},[]).join("|"); | |
el = el || "em"; |
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
process.stdin.setEncoding('utf8'); | |
// becomes readable on every [enter] keystroke | |
process.stdin.on('readable', function(chunk) { | |
var chunk = process.stdin.read(); | |
if (chunk !== null) { | |
console.log(chunk | |
.split('') | |
.map(function(c) { | |
return String.fromCharCode(c.charCodeAt(0)-1); |
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 required = function(name) { | |
name = name.toString(); | |
return new Promise(function(resolve, reject) { | |
require([name], function(module) { | |
resolve(module); | |
}, | |
function(err){ | |
reject(err); | |
}); | |
}); |
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
PS1='\[\033[01;32m\]art\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] ' |
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 array = [1,7,5,9,0,4,12,56,7,0,45,8,2,3,6,7,8,1,5,0]; | |
Array.prototype.move = function (old_index, new_index) { | |
if (new_index >= this.length) { | |
var k = new_index - this.length; | |
while ((k--) + 1) { | |
this.push(undefined); | |
} | |
} | |
this.splice(new_index, 0, this.splice(old_index, 1)[0]); | |
return this; // for testing purposes |
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 array = [1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0,1, 7, 5, 9, 0, 4, 12, -56, 7, 0, -45, 8, 2, 3, 6, 7, 8, 1, 5, 0]; | |
var merge = function(left, right) { | |
var ret = []; | |
var length = left.length>right.length? left.length : right.length; | |
while(!!left.length || !!right.length) { | |
var l = left[0]; | |
var r = right[0]; | |
if (l === undefined || l > r) { ret.push(right.shift()); continue;} | |
if (r === undefined || r >= l) { ret.push(left.shift()); continue;} | |
} |
OlderNewer