Skip to content

Instantly share code, notes, and snippets.

View addamh's full-sized avatar

Addam Hardy addamh

View GitHub Profile
@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}`
@jraines
jraines / rails31init.md
Created May 24, 2011 17:03
Rails 3.1 with Rspec, Cucumber, Factory Girl, Haml, and Simple Form

Install Rails 3.1 RC

gem install rails --pre

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

@cmhobbs
cmhobbs / notifier.rb
Created August 16, 2011 21:22
Resque multiple failure notifier via postmark
# this goes in lib/resque/failure/notifier.rb
require 'resque/failure/multiple'
require 'resque/failure/redis'
require 'postmark'
require 'mail'
module Resque
module Failure
class Notifier < Base
@chriseppstein
chriseppstein / readme.md
Created August 31, 2011 21:57 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline

This gist is no longer valid. Please see Compass-Rails for instructions on how to install.

@davist11
davist11 / gist:1204569
Last active July 1, 2024 02:51
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
butts: ":open_hands: :smoking:"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
@mbostock
mbostock / .block
Last active December 6, 2024 07:57
Hierarchical Bar Chart
license: gpl-3.0
redirect: https://observablehq.com/@d3/hierarchical-bar-chart
@maxjustus
maxjustus / gist:1454583
Created December 10, 2011 04:33
Rando bukk.it
require 'net/http'
p = Net::HTTP.get(URI.parse('http://bukk.it'))
regexp = /href=\"(.*?\..*?)\"/
images = p.scan(regexp).flatten
image = images[rand(images.length)]
puts "http://bukk.it/" + image

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@cstrahan
cstrahan / pair.md
Created April 11, 2012 00:22 — forked from wm/pair.md
TMUX Pairing

SSH setup for remote pairing

If Animal and Fozzie wanted to pair on Animals machine and they both have access to shared.muppets.com then they could use the following setup

  • Animal will have the following in ~/.ssh/config
Host tunnel_from_muppets
  Hostname space.muppets.com
 RemoteForward 1235 localhost:22
@dzhou
dzhou / amzn_scraper.py
Created May 8, 2012 03:45
amazon review scraper
#!/usr/bin/env python
import urllib
import pprint
import amazonproduct
from BeautifulSoup import BeautifulSoup
from review import db
AWS_KEY = 'YOUR_AWS_KEY'
SECRET_KEY = 'YOUR_AWS_SECRET_KEY'
API_PAGE_LIMIT = 10