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
# ------------------------------------------------------ | |
# Really simple template parser in CoffeeScript. | |
# Matches {{keyword}} syntax. | |
# Input: string, object | |
# Output: string | |
# | |
# Ex: templar("Hello {{planet}}!", {planet: "World"}); | |
# -> outputs "Hello World!" | |
# ------------------------------------------------------ | |
templar = (input, data) -> |
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
/** | |
* onAir.js | |
* | |
* @param {string} day [the day your show airs (eg. "Tuesday")] | |
* @param {string} start [start time of the show in 24hr format (eg. "13:00")] | |
* @param {string} end [stop time of the show in 24hr format (eg. "14:30")] | |
* @param {string} timezone [the UTC time zone of your show (eg. "-6" for Central Time)] | |
* @return {bool} | |
*/ | |
var onAir = function (day, start, end, timezone) { |
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
// Optional object namespace | |
var app = {}; | |
(function (exports) { | |
(function (exports) { | |
// module exports | |
exports.moduleName = { | |
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
{ | |
"name": "http-server", | |
"version": "0.0.0", | |
"author": "Steven Schobert <spschobert@gmail.com>", | |
"description": "let there be javascripts", | |
"scripts": { | |
"start": "node ./bin/http-server", | |
"test": "vows --spec --isolate", | |
"predeploy": "echo This will be run before deploying the app", | |
"postdeploy": "echo This will be run after deploying the app" |
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
# grep for process | |
ps -ax | grep node | |
# find the process id and kill it | |
kill -9 PROCESS_ID |
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
bundle exec turn -I "lib:test" test/unit/user_test.rb -n "sort by current streak" |
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
// event emitter factory built off jQuery events | |
eventEmitter = function eventEmitter () { | |
var pipe = $({}), | |
api = { | |
trigger: function trigger (event, data) { | |
pipe.trigger({ | |
type: event, | |
customData: data | |
}); | |
}, |
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 isPortrait() { | |
return Math.abs(window.orientation) / 90 !== 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
// note: if you don't need IE8 support, you can just do | |
// return image.tags.indexOf('TAGNAME') !== -1; | |
filter: function(image) { | |
var foundTag = false, tags = image.tags; | |
for(var i=0,len=tags.length; i<len && !foundTag; i++) { | |
if (tags[i] === 'THE_TAG_NAME') foundTag = true; | |
}; | |
return foundTag; |
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
sudo chmod ugo-x /usr/libexec/path_helper |
OlderNewer