Skip to content

Instantly share code, notes, and snippets.

ssh_user = "user@domain.com" # for rsync deployment
remote_root = "~/path/to/remote/" # for rsync deployment
desc "Runs preview"
task :preview do
system "staticmatic preview ."
end
desc "Builds the site"
task :build => 'styles:clear' do
generate("cucumber")
run("rm -rf features")
git(:clone => "http://github.com/ultrasaurus/workshop-features.git")
run("mv workshop-features features")
inside("features") { run("rm -rf .git") }
run("echo log/ > .gitignore; echo 'db/*.sqlite3' >> .gitignore;")
inside("config") { run('echo "default: --format pretty" > cucumber.yml') }
rake("db:migrate")
@defunkt
defunkt / browser
Created March 1, 2010 10:01
pipe html to a browser
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle
@media all and (max-width: 1024px)
.content
width: 85%
@media all and (max-width: 800px)
.content
width: auto
.next .vevent
@lukeredpath
lukeredpath / fetch_finance_reports.rb
Created July 28, 2010 15:00
Fetch iTunes finance reports for your iPhone apps
#!/usr/bin/env ruby
require 'mechanize'
require 'open-uri'
require 'pathname'
require 'fileutils'
require 'pp'
### BEGIN CUSTOMIZATION
# set this to where you would like the reports to be stored
@dnagir
dnagir / rspec-syntax-cheat-sheet.rb
Created November 5, 2010 09:29
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@dpickett
dpickett / tmux_textaurant.sh
Created December 1, 2010 15:31
scripted way to start your work in a Rails project
export WORKING_DIR=~/work/textaurant
cd $WORKING_DIR; mvim; gitx
tmux start-server
tmux new-session -d -s Textaurant -n work
tmux new-window -tTextaurant:1 -n server
tmux new-window -tTextaurant:2 -n test
tmux send-keys -tTextaurant:0 'cd $WORKING_DIR' C-m
@nutrun
nutrun / earl.rb
Created March 3, 2011 02:49
Ruby strings that do web things
# Earl: Strings that do web things
#
#
# Examples:
#
# text = "Blah blah http://tinyurl.com/4bnjzbu blah http://tinyurl.com/4tefu9f"
#
# text.urls # => ["http://tinyurl.com/4bnjzbu", "http://tinyurl.com/4tefu9f"]
#
# text.locations # => ["http://nutrun.com/weblog/2010/11/17/supercharged-ruby-console-output.html", "http://nutrun.com"]
@jarib
jarib / gist:902119
Created April 4, 2011 18:18
se-conf, google translate example
We couldn’t find that file to show.