Like so: var s = `abc`;
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var _ = require('lodash'); | |
var talk = function( phraseObj ) { | |
var obj = _.cloneDeep(phraseObj); | |
return function() { | |
console.log(obj.phrase); | |
}; | |
}; |
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
module.exports = (function () { | |
var _ = require('underscore'); | |
var isCollection = function(item) { | |
return (_.isObject(item) || _.isArray(item) || _.isArguments(item)); | |
}; | |
var complement = function(fn) { | |
return function() { |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^a w | |
New -s <session> Create ^a c | |
Attach att -t <session> Rename ^a , <name> | |
Rename rename-session -t <old> <new> Last ^a l (lower-L) | |
Kill kill-session -t <session> Close ^a & |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Steve Souder's Mobile Perf Tools (sources listed below)
When watching David Nolen's excellent Lambda Jam keynote on InfoQ, the references to interesting reading came a little too fast and furious for me to jot down, so I went through the slides and put this gist together.
- The Dream Machine: J.C.R. Licklider and the Revolution That Made Computing Personal - M. Mitchell Waldrop
- Purely Functional Data Structures - Chris Okasaki
- Ideal Hash Trees - Phil Bagwell
- RRB-Trees: Efficient Immutable Vectors - Phil Bagwell, Tiark Rompf
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
# moved internal properties to arguments.callee so | |
# we don't have to worry about name collisions with our | |
# context. | |
tco = (fn) -> | |
(args...) -> | |
my = arguments.callee | |
my.recurred = false | |
my.args = [] |