# having a wat moment here in ruby
0 <=> 1
# => -1 (left is less, or another way to think of it,
# the argument 1 is less than 0)
"0" <=> "1"
# => -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
# Gemfile | |
source "http://rubygems.org" | |
gem 'eventmachine' | |
gem 'em-net-http' | |
gem 'em-http-request', "=1.0.0.beta.4" | |
gem 'em-mysql', "=0.4.2" | |
# server.rb |
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
@zedshaw | |
I was up 'till 3:30am last night because I had figured out something incredibly cool about music on the | |
guitar. If you take the intervals in major pentatonics you get: | |
C D E G A C = ww(m3)wm3 so Whole Whole (minor3) Whole Minor3. | |
So a minor pentatonic is the same intervals, just shuffled over: | |
ACDEGA = m3 w (w) m3 w | |
Same interval setup, which makes sense. Now, if you do the same thing with a 5 note dominant arpeggio | |
you get: |
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
# ***************************************** | |
# .irbrc | |
# | |
# Includes lots of nice stuff to make | |
# your irb and script/console ruby shell | |
# more pretty and productive | |
# | |
# ***************************************** | |
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
(function($) { | |
// i hate globals too but this is all that works | |
window.Album = new (Backbone.Model.extend({ | |
defaults: { | |
foo: "bar" | |
} | |
})); | |
})(jQuery); |
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
box ~ > npm install jitsu -g | |
/usr/local/bin/jitsu -> /usr/local/lib/node_modules/jitsu/bin/jitsu | |
box ~ > jitsu | |
info: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command | |
help: ___ __ | |
help: / / / /_ / / | |
help: __/ / / __/ /__/ |
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
require 'pp' | |
# this is what the rails POST form params look like | |
have = { | |
"concert"=>"yanni", | |
"description"=>"an epic soundscape about oceans and stuff", | |
"set_list"=>{ | |
"0"=>{ | |
"set_list"=>"opener", | |
"energy"=>"high", |
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
# all are on instant streaming | |
# from Eric Macks http://ericmackattacks.wordpress.com/2011/01/06/100-good-movies-available-to-watch-instantly-on-netflix-january-edition/ | |
The Battleship Potemkin (1925, Sergei M. Eisenstein) | |
The Gold Rush (1925, Charles Chaplin) | |
The General (1926, Clyde Bruckman/Buster Keaton) | |
Man with the Movie Camera (1929, Dziga Vertov) | |
The Rules of the Game (1939, Jean Renoir) | |
Stagecoach (1939, John Ford) | |
The Pride of the Yankees (1942, Sam Wood) |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
# Here's what you can do with this capistrano setup: | |
# > cap staging deploy:setup | |
# > cap staging deploy | |
# (create your database by hand) | |
# > cap staging deploy:migrate | |
# this is specific to my app because my fixtures are my seeds :( | |
# > cap staging fixtures | |
# same commands above with production: |