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 ActionControllerExtensions | |
def self.included(base) | |
base::Dispatcher.send :include, DispatcherExtensions | |
end | |
module DispatcherExtensions | |
def self.included(base) | |
base.send :before_dispatch, :set_session_domain | |
end | |
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 ActionControllerExtensions | |
def self.included(base) | |
base::Dispatcher.send :include, DispatcherExtensions | |
end | |
module DispatcherExtensions | |
def self.included(base) | |
base.send :before_dispatch, :set_session_domain | |
end | |
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
# OfflineIMAP config for GMail backup (only tested on OS X) | |
# Save it as ~/.offlineimaprc | |
# NB: this will sync *everything*, including All Mail, Spam, Bin, etc. | |
[general] | |
metadata = ~/.offlineimap | |
accounts = GMail | |
maxsyncaccounts = 1 | |
# You might want to change the below to ui = TTY.TTYUI the first time you run offlineimap | |
# It can choke on large attachments and GMail might reset the connection if you download too much |
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
100%[==================================================================================================================>] 608,462 12.3K/s in 34s | |
2010-09-17 15:28:54 (17.5 KB/s) - `/tmp/caffo-passenger-standalone-7527/nginx-0.7.67.tar.gz' saved [608462/608462] | |
Installing Phusion Passenger Standalone... | |
/Users/caffo/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/erb.rb:719: command not found: /Users/caffo/.rvm/wrappers/ruby-1.8.7-p249%global/ruby /Users/caffo/.rvm/gems/ruby-1.8.7-p249%global/bin/rake package:filelist --silent | |
/Users/caffo/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/erb.rb:719: command not found: /Users/caffo/.rvm/wrappers/ruby-1.8.7-p249%global/ruby /Users/caffo/.rvm/gems/ruby-1.8.7-p249%global/bin/rake nginx CACHING=no --dry-run | |
/Users/caffo/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/erb.rb:719: command not found: /Users/caffo/.rvm/wrappers/ruby-1.8.7-p249%global/ruby /Users/caffo/.rvm/gems/ruby-1.8.7-p249%global/bin/rake nginx CACHING=no --trace STDERR_TO_STDOUT=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
#!/usr/bin/env ruby | |
stations = { | |
'atmos' => 'http://89.179.179.5:8107/', | |
'goth' => 'http://85.25.184.19:7500/', | |
'goa' => 'http://87.230.21.161:6666/', | |
'heavy' => 'http://www.anothercog.com:8000/' | |
} | |
stations[ARGV[0]].nil? ? stations.each{|s| p s} : exec("mpg123 #{stations[ARGV[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
<style type='text/css'> | |
body { | |
background-color: #ccc; | |
} | |
* { | |
padding: 10px; | |
} | |
.header{ | |
width: 86%; | |
left: 7% |
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
;; byte-code tower algorithm solver | |
000000 0 1 2 3 4 5 6 7 8 9 0 1 D: 0 | |
000000 1 0 0 0 0 1 2 3 4 5 6 * X: 0 | |
000000 2 0 0 1 1 2 3 4 5 6 7 0 L: 0 | |
000000 3 0 0 2 2 3 4 5 6 7 8 0 P: 0 | |
000000 4 P 1 P 3 4 5 6 7 8 9 0 | |
000000 5 E E E E E P E E P E 0 | |
000000 6 X X X X X X X X X X 0 | |
000000 |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mechanize' | |
mecha = Mechanize.new { |agent| agent.user_agent_alias = 'Mac Safari' } | |
login = mecha.get("http://www.instapaper.com/user/login") | |
login.form_with(:action => '/user/login') do |f| | |
f.username = "instapaper@username.com" |
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
{ | |
[["subscription","A coupon is already associated with this subscription."]] | |
} |
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
{ | |
"coupon" :{ | |
"name": "25% off", | |
"code": "25OFF", | |
"description": "25% off for life", | |
"percentage": "25", | |
"allow_negative_balance": "false", | |
"recurring": "false", | |
"end_date": "2012-08-29T12:00:00-04:00" | |
} |