Skip to content

Instantly share code, notes, and snippets.

View stuartsaunders's full-sized avatar
👋

Stuart Saunders stuartsaunders

👋
View GitHub Profile
@stuartsaunders
stuartsaunders / workflow.md
Created June 22, 2010 05:07 — forked from zaach/workflow.md
Versioning and Git Workflow

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@stuartsaunders
stuartsaunders / README.md
Created September 9, 2020 17:32 — forked from jesstelford/01-shape-up-to-kindle.md
Read SHAPE UP by basecamp in a single page or on a Kindle

Read Shape Up by basecamp in a single page

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

To read it all in a single page:

  1. Go to the first chapter: https://basecamp.com/shapeup/0.1-foreword
  2. In the URL bar, type javascript:
  3. Paste in this single line of JavaScript (so the URL bar looks like javascript:var style=do...)
@stuartsaunders
stuartsaunders / keybase.md
Created October 27, 2019 18:50
Keybase proof

Keybase proof

I hereby claim:

  • I am stuartsaunders on github.
  • I am stuartsaunders (https://keybase.io/stuartsaunders) on keybase.
  • I have a public key ASBvdtGxPLybp-OhfanqKse9sYQ7WWrrMbkwxEGId27Ynwo

To claim this, I am signing this object:

@stuartsaunders
stuartsaunders / connection_fix.rb
Created September 29, 2011 18:44 — forked from defunkt/connection_fix.rb
MySQL server has gone away fix
# If your workers are inactive for a long period of time, they'll lose
# their MySQL connection.
#
# This hack ensures we re-connect whenever a connection is
# lost. Because, really. why not?
#
# Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar)
#
# From:
# http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/
@stuartsaunders
stuartsaunders / copy-s3-bucket.rb
Created June 3, 2011 01:41 — forked from zefer/copy-s3-bucket.rb
Copy contents of an S3 bucket to a another bucket using an EC2 instance and a simple Ruby script. Useful for transferring large amounts of data and will work across geographic regions.
require 'rubygems'
require 'right_aws'
aws_access_key_id = 'your-access-key'
aws_secret_access_key = 'your-secret-key'
target_bucket = 'your-source-bucket'
destination_bucket = 'your-destination-bucket'
s3 = RightAws::S3Interface.new(aws_access_key_id, aws_secret_access_key)
#!/usr/bin/env ruby
# CIJoe mail notification script.
# Some things in here are shamelessly ripped from
# http://gist.github.com/374030
#
# Call this from your hooks (build-worked, build-failed) with something like:
# ~/ci/scripts/mail.rb ~/ci/PROJECT/ CIJOE_URL BRANCH
#
# Requirements
@stuartsaunders
stuartsaunders / .gitignore
Created December 30, 2010 15:18
Global Git ignore file
git config --global core.excludesfile ~/.gitignore
@stuartsaunders
stuartsaunders / .irbrc
Created December 28, 2010 02:29
awesome_print 0.3.x workaround for ActiveRecord objects in Rails 2.3.x
# https://github.com/michaeldv/awesome_print/issues/issue/22
require 'rubygems'
require 'irb/completion'
require 'yaml'
module ActiveRecord; end
...
@stuartsaunders
stuartsaunders / vim-ruby-debugger
Created December 26, 2010 15:02
Macports vim and vim-ruby-debugger
# https://github.com/astashov/vim-ruby-debugger
# x11 variant will install clientserver variant
sudo port upgrade vim +ruby +x11
@stuartsaunders
stuartsaunders / gist:755501
Created December 26, 2010 16:50
Uninstall inactive Macports
sudo port uninstall inactive