Skip to content

Instantly share code, notes, and snippets.

@egobrain
egobrain / ast_helper.erl
Created July 2, 2013 08:55
Erlang Ast helper.
-define(atom(Atom),erl_syntax:atom(Atom)).
-define(var(Var),erl_syntax:variable(Var)).
-define(underscore,erl_syntax:underscore()).
-define(apply(Fun,Args),erl_syntax:application(?atom(Fun),Args)).
-define(apply(Mod,Fun,Args),erl_syntax:application(?atom(Mod),?atom(Fun),Args)).
-define(apply_(Fun,Args),erl_syntax:application(Fun,Args)).
-define(clause(Pattern,Guard,Body),erl_syntax:clause(Pattern,Guard,Body)).
-define(cases(Arg,Clauses),erl_syntax:case_expr(Arg,Clauses)).
-define(ifs(Clauses),erl_syntax:if_expr(Clauses)).
@svnlto
svnlto / install.md
Created December 12, 2011 22:59
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, nvm

Setup new Mac with OSX Lion from scratch

These commands are good as of 2011-07-27.

Install Xcode 4

The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.

Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.

@jtomson
jtomson / gist:771828
Created January 9, 2011 17:21 — forked from shripadk/gist:652819
some coffeescript-node-redis boilerplate
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'