Skip to content

Instantly share code, notes, and snippets.

View wpeterson's full-sized avatar

Winfield Peterson wpeterson

View GitHub Profile
git checkout develop # all developer work is off of this branch
git pull --rebase # make sure local develop is up-to-date (can this be git rebase?)
git checkout -b my-nifty-feature-559876 # create your feature branch; I like to put Pivotal story ID in it for convenience; not required
# do your work, make sure all tests still pass, etc. COMMIT FREQUENTLY
git commit -m "First part of my nifty feature working; now on to the back-end."
# fetch latest remote develop and rebase your local feature branch on this.
git fetch
git rebase origin/develop
# Local feature branch now has latest origin/develop code as base
@wpeterson
wpeterson / ruby-193-p327-falcon_deb.sh
Created December 6, 2012 00:41 — forked from johnbintz/gist:2965472
ruby 1.9.3-p327 with performance patches built into a .deb package with fpm
# For Debian Squeeze
# Part 1: Make a deb package of ruby:
# Get our deps
sudo apt-get update
sudo apt-get install -y python-setuptools python-dev build-essential dpkg-dev libopenssl-ruby ruby1.8-dev rubygems bison autoconf zlib1g zlib1g-dev libreadline6 libreadline6-dev libssl0.9.8 libssl-dev libyaml-dev
# Get ruby
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -zxvf ruby-1.9.3-p327.tar.gz
@wpeterson
wpeterson / gist:1278721
Created October 11, 2011 17:15 — forked from javan/gist:1168475
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
# Filename: RAILS_ROOT/config/initializers/paperclip_thumbnail_with_dimensions.rb
# Required Configuration in the model
#
# include Paperclip::Dimensions
#
# has_attached_file :image,
# :styles => {
# :thumbnail => {
# :geometry => "100x100>",
# :format => :png