Skip to content

Instantly share code, notes, and snippets.

@borgand
borgand / config.ru
Created October 17, 2011 08:37 — forked from mislav/config.ru
Shortest simplest sweetest web "hello {NAME}" in Ruby
run ->(e){ n=e['PATH_INFO'][1..-1]; [200, {'Content-type'=>'text/html'}, ["Hello #{n}!"]] }
@borgand
borgand / pow
Created June 23, 2011 15:50 — forked from ches/pow
A quick script to switch between running Pow and MacPorts Apache2 on OS X
#!/bin/sh -e
#/ Usage: pow [on|off]
#/ Toggle between running Pow (http://pow.cx) and Apache on Mac OS X.
# Show Usage
function usage {
grep '^#/' "$0" | cut -c4-
exit 2
}
[ -z "$1" -o "$1" = "--help" ] && usage
@borgand
borgand / Rakefile
Created February 1, 2010 10:32 — forked from lukeredpath/gist:72511
Rakefile for iPhone distribution releasing
TARGET_NAME = "Rivals"
RELEASE_OUTPUT_PATH = File.expand_path("~/proged/releases/#{TARGET_NAME}")
CONFIGURATION = ENV['CONFIGURATION'] || "Release"
SDK_VERSION = ENV['SDK'] || 'iphoneos3.1'
desc "Build main target and zip the release bundle (also bumps all versions)."
task :release => ['bump:all'] do
puts "* Building #{CONFIGURATION} release."
`xcodebuild -target #{TARGET_NAME} -configuration #{CONFIGURATION} -sdk #{SDK_VERSION}`