Conway's Game of Life in Erlang, in 2 hours, with 0 Erlang experience, in 20 lines of code.
1337 h4x0rs:
- @jszmajda
- @ngauthier
- @ericoestrich
- @danivovich
- @kafuchau
Puppet Install steps for Ubuntu 10.04, ruby 1.8, and passenger | |
apt-get -y update | |
apt-get -y dist-upgrade | |
reboot | |
############################################ | |
apt-get -y install build-essential | |
apt-get -y install bsubversion apache2 libcurl4-openssl-dev libssl-dev mysql-server |
Conway's Game of Life in Erlang, in 2 hours, with 0 Erlang experience, in 20 lines of code.
1337 h4x0rs:
ls -lh `mdfind -onlyin $HOME -name test.log` |
describe 'outer', :one => { :two => 2 } do | |
context 'inner1' do | |
before do | |
example.metadata[:one][:three] = 3 | |
end | |
it 'should have 3' do | |
example.metadata[:one][:three].should == 3 | |
end | |
end |
class Lisp | |
def initialize | |
@env = { | |
:label => lambda { |(name,val), _| @env[name] = val }, | |
:quote => lambda { |sexpr, _| sexpr[0] }, | |
:car => lambda { |(list), _| list[0] }, | |
:cdr => lambda { |(list), _| list.drop 1 }, | |
:cons => lambda { |(e,cell), _| [e] + cell }, | |
:eq => lambda { |(l,r), _| l == r }, | |
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) }, |
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:
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. pg_ctl -D /usr/local/var/postgres stop -s -m fast | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. curl https://raw.github.com/fragility/homebrew/737af01178590950749cf5e841f2d086c57c5a80/Library/Formula/postgresql.rb > /usr/local/Library/Formula/postgresql.rb | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"text/tabwriter" | |
"time" | |
) |
# Mac preference changes: | |
# * minimize and hide dock | |
# * undo natural scrolling | |
# * max out keyboard repeat | |
# * increase desktop resolution | |
# * show date in menubar | |
# * do not play feedback when volume is changed | |
# * do not play user interface sounds | |
# * maximize mouse tracking speed |