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
# This script assumes a dump of images from the Everyday iOS app. | |
# It distributes all images from images/ into N subdirectories, | |
# starting with 1 and proceeding to N. | |
# the intention is to load these images into a video editor | |
# to make a variant of Kalina's videos that shows multiple | |
# images at once. | |
require 'FileUtils' | |
print "Looking for images in folder 'images'... " |
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 colors = ['FC4A39', 'F7CD6C', '79F7B9', 'AFC870', 'FD9A3F', 'FC5879', 'BA63BD', '5CF196']; |
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
`curl -O 'http://jakelodwick.imgix.net/bball.jpg\n'` |
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
#current way | |
curl -H "Content-Type: application/json" -d '{ "msg": "your_value_here" }' https://sender.blockspring.com/api/blocks/2a5d9f4c92ae2631f3f35db803f1c52b?api_key=Log-In-to-see-your-API-key | |
#possible alternative | |
curl -H "Content-Type: application/json" -d '{ "block_id": "2a5d9f4c92ae2631f3f35db803f1c52b", "msg": "your_value_here", "api_key": "Log-In-to-see-your-API-key" }' https://sender.blockspring.com/api/ |
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
#put this in your Gemfile: | |
gem "rack-coffee" | |
#(don't forget to run `bundle` on the command line) | |
#put this in your Sinatra app: | |
use Rack::Coffee, | |
:root => 'public', | |
:urls => '/coffee', | |
:join => 'index', | |
:bare => true |
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
# pretty-print JSON | |
# http://stackoverflow.com/questions/4810841/how-can-i-pretty-print-json-using-javascript | |
ppjson = (obj) -> | |
console.log JSON.stringify obj, undefined, 2 |
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
# last element of array, | |
# alternative to `my_array[my_array.length - 1]` | |
# via http://stackoverflow.com/questions/9050345/selecting-last-element-in-javascript-array | |
unless Array::last | |
Array::last = -> | |
this[@length - 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
# run these two commands: | |
open http://localhost:8000/ | |
python -m SimpleHTTPServer | |
# I put the following in ~/.profile (OS X) so it runs every time I open a terminal window: | |
alias phttp="open http://localhost:8000/; python -m SimpleHTTPServer" |
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
heroku plugins:install git://github.com/ddollar/heroku-config.git | |
heroku config:pull --overwrite --interactive |
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
.vcenter { | |
display: inline-block; | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} |
OlderNewer