Skip to content

Instantly share code, notes, and snippets.

@cjheath
cjheath / life.rb
Created April 2, 2014 10:43
Conways game of Life, implemented without using a finite-sized world or "each"
class Cell
Directions = [
[-1,1], [0,1], [1,1],
[-1,0], [1, 0],
[-1,-1],[0,-1], [1,-1]
]
# Where am I?
def home
[@x, @y]
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@ruckus
ruckus / AppController.php
Created October 25, 2012 04:51
CakePHP Request logging ala Rails
class AppController extends Controller {
function beforeFilter() {
$this->capture_request_head_for_log();
}
/*
Log some basic basic details of the HTTP Request:
Started GET "/users/lost" for 127.0.0.1 at 2012-10-24 19:18:25 -0700
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods