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
syntax on | |
colorscheme elflord | |
filetype plugin indent on | |
set nocompatible | |
set nowrap | |
set showmatch | |
set tabstop=2 | |
set incsearch |
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
# Make your changes | |
git commit -m "Your commit message" | |
git co joshp/staging | |
git merge master | |
git co joshp/production | |
git merge master | |
git push | |
git co master | |
# Push files to live servers |
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
syntax on | |
colorscheme elflord | |
filetype plugin indent on | |
set nocompatible | |
set nowrap | |
set showmatch | |
set tabstop=2 | |
set incsearch |
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
[user] | |
name = "Russ Smith" | |
email = "[email protected]" | |
[alias] | |
ci = commit -a -v | |
co = checkout | |
st = status -a | |
praise = blame | |
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
type of coupon "Free Shipping" | |
applies when { order total is over 100.0 } | |
type of coupon "10% Off" | |
applies when { always } | |
type of coupon "Buy A Shirt Get 2 Free" | |
applies when { order items contains { 2 shirts }} |
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
<? | |
$routing = new Routing(); | |
$mapper = new Mapper(); | |
$mapper->connect(':controller/:action/:id', array( 'controller' => "pages", 'action' => "index", 'name' => "default" )); | |
$mapper->connect('signup', array( ':controller' => 'users', ':action' => 'create' )); | |
$mapper->connect('activate/:key', array( ':controller' => 'users', ':action' => 'activate' )); | |
$mapper->connect('set_password/:key', array( ':controller' => 'users', ':action' => 'set_password' )); |
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 'rubygems' | |
require 'sinatra' | |
require 'RMagick' | |
ROOT_PATH = File.expand_path(File.dirname(__FILE__)) | |
get '/*' do | |
resize_image(params[:splat].first) | |
redirect("/#{params[:splat].first}") | |
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
God.watch do |w| | |
w.name = 'starling' | |
w.interval = 5.seconds | |
w.start = 'starling' | |
w.stop = 'killall starling' | |
w.restart = 'killall starling && starling' | |
w.pid_file = '/var/run/starling.pid' | |
# determine when process has finished starting | |
w.transition(:init, { true => :up, false => :start }) do |on| |
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 'open-uri' | |
while true do | |
r = open('http://google.com') | |
raise StandardError if r.status != [ '200', 'OK' ] | |
timestamp = Time.parse(r.read.match(/\<!\s*-- (.*?) (.*?)(--\s*\>)/)[2].strip) | |
raise StandardError if (Time.now - timestamp) > 600 |
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
setenv LC_CTYPE en_US.UTF-8 | |
defutf8 on | |
autodetach on | |
crlf off | |
deflogin off | |
hardcopy_append on | |
startup_message off | |
vbell off |
OlderNewer