Skip to content

Instantly share code, notes, and snippets.

View josephhainline's full-sized avatar

Joseph Hainline josephhainline

View GitHub Profile
@adkron
adkron / developer_levels.md
Last active September 21, 2016 20:51
What makes a certain level of developer?

Entry

  • Passion
    • Wants to learn
    • Eager to learn
  • Aptitude
    • Can learn a new language with little help
  • Understands basics to a Language
  • Language comprehension
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@brettswift
brettswift / gist:2002200
Created March 8, 2012 17:24
brew install gource bug
bash local $ brew install -v gource
==> Cloning https://github.com/acaudwell/Gource.git
Updating /Users/bswift/Library/Caches/Homebrew/gource--git
git remote set-url origin https://github.com/acaudwell/Gource.git
git fetch origin
git fetch --tags
==> Checking out tag gource-0.37
git checkout gource-0.37
HEAD is now at 1e12d58... Check for unsetenv.
@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")
# Goal: Allow addition of instances to a collection in a factory-built object
# when those instances require references to the parent.
# Typically occurs in Rails when one model has_many instances of another
# See more at:
# http://stackoverflow.com/questions/2937326/populating-an-association-with-children-in-factory-girl
class Factory
def has_many(collection)
# after_build is where you add instances to the factory-built collection.