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 count = 0; | |
var feed = new Instafeed({ | |
filter: function(image) { | |
count += 1; | |
if (count % 4 === 0) { | |
image.customTagOpen = '<div>'; | |
image.customTagClose = '</div>'; | |
} else { | |
image.customTagOpen = ''; |
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 clone(value, deep) { | |
var boo = '[object Boolean]'; | |
var num = '[object Number]'; | |
var str = '[object String]'; | |
var obj = '[object Object]'; | |
var arr = '[object Array]'; | |
var date = '[object Date]'; | |
var reg = '[object RegExp]'; | |
var cloned; | |
var klass; |
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
tell application "OmniFocus" to activate | |
tell application "System Events" | |
tell process "OmniFocus" | |
set perspectivesMenu to the first menu bar item of item 1 of menu bars whose name contains "Perspectives" | |
set inboxMenuItem to the first menu item of the first menu of perspectivesMenu whose name is "Inbox" | |
set viewMenu to the first menu bar item of item 1 of menu bars whose name contains "View" | |
click inboxMenuItem | |
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
tell application "System Events" to tell process "Dock" | |
set dock_dimensions to size in list 1 | |
set dock_width to item 1 of dock_dimensions | |
set dock_height to item 2 of dock_dimensions | |
end tell |
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
heroku pg:backups capture | |
# replace BACKUP_NUM with backup number from above | |
heroku pg:backups public-url BACKUP_NUM | |
# replace URL with step from above | |
curl -o latest.dump URL | |
# replace LOCAL_DB_NAME with local database table | |
# replace DB_USERNAME with db user |
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
require 'rack' | |
require 'json' | |
COUNTERS = {} | |
app = Proc.new do |env| | |
req = Rack::Request.new(env) | |
COUNTERS[req.path] ||= 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
/** | |
* 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" |