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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html lang='en-US' xml:lang='en-US' xmlns='http://www.w3.org/1999/xhtml'> | |
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<title>Urban Dictionary, March 9: SMTA</title> | |
<script type='text/javascript'> | |
//<![CDATA[ | |
var MobileDetector={redirect:function(b,a){if(b&&b.match(/(iPhone|iPod|Android|webOS|Opera Mini|PlayStation Portable)/)){this.go(a)}},go:function(a){window.location=a}}; | |
MobileDetector.redirect(navigator.userAgent, "http://m.urbandictionary.com/"); | |
//]]> | |
</script> |
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 Heroku | |
class StaticAssetsMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
# call returns an array containing [response code, header, Rack::Response] | |
reply = @app.call(env) |
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 'httparty' | |
require 'ap' | |
$url = ARGV.shift | |
$cookie = ARGV.shift | |
raise unless $url && $cookie | |
class Client | |
include HTTParty |
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
def self.commit_hash | |
@commit_hash ||= begin | |
files = Dir["public/**/*"].select { |f| File.file?(f) }.sort | |
contents = files.map { |f| File.read(f) }.join | |
hash = Digest::MD5.hexdigest(contents)[0..6] | |
"rel-#{hash}" | |
end | |
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
#!/bin/sh -e | |
for i in "$@"; do | |
HandBrakeCLI -i "$i" -o "${i%.*}-ipad.mp4" --preset="iPad" | |
done |
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 'spork' | |
Spork.prefork do | |
ENV['RAILS_ENV'] = ENV['RACK_ENV'] = 'test' | |
ENV['SPHINX_ON'] = 'true' | |
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) | |
require 'spec/autorun' | |
require 'spec/rails' | |
require 'webrat/integrations/rspec-rails' |
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
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz" | |
install_package "ruby-1.9.3-p194" "http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p194.tar.gz" |
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 'queue_classic' | |
module CloudApp | |
Queue = QC::Queue | |
FailedQueue = QC::Queue.new 'queue_classic_failed_jobs' | |
class Worker < QC::Worker | |
def handle_failure(job, exception) | |
FailedQueue.enqueue job |
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 "Adium" | |
repeat with c in every contact | |
set blocked of c to true | |
end repeat | |
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
for app in `heroku apps | awk '{ print $1 }'`; do heroku addons --app $app; done |