This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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, |
NewerOlder