Skip to content

Instantly share code, notes, and snippets.

View brownman's full-sized avatar

brownman brownman

  • self
  • israel
View GitHub Profile
This example shows how to setup an environment running Rails 3 under 1.9.2 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.2
# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.2@rails3
@brownman
brownman / Capfile
Created November 20, 2010 08:54 — forked from nstielau/Capfile
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
##################################
# Edit these
set :application, "example_node_app"
set :node_file, "hello_world.js"
set :host, "ec2-174-129-114-66.compute-1.amazonaws.com"
ssh_options[:keys] = [File.join(ENV["HOME"], ".ec2", "default.pem")]
set :repository, "git://gist.github.com/479007.git"
set :branch, "master"
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta3"
gem "bson_ext"
gem "mongoid", "2.0.0.beta4"
gem "haml", "3.0.0.rc.2"
gem "compass", "0.10.0.rc4"
gem "inherited_resources"
group :test do
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl http://npmjs.org/install.sh | sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install
curl http://npmjs.org/install.sh | sh
#the new tap method of ruby will always return itself, but lets you play with!
data = (1..10).to_a
data.tap{|x| print x}.to_a.join(', ')
p
#alias will redirect method calls to method with a different name, useful for api changing
class SomeClass
def new_method(x)
p "The value is #{x}"

IMPORTANT! Wikified version of this page may be found here. Feel free to edit. :)

Note that since it's kind of PITA to merge changes from other gists it's recommended that you do your changes directly to the wiki!

Game Engines

Name Latest Release Size (KB) License Type Unit Tests Docs Notes
Akihabara 1.3 GPL2/MIT Classic Repro Intended for making classic arcade-style games in JS+HTML5 3
Aves Commercial? Obsolete. Company bought by Zynga.
@brownman
brownman / test.coffee
Created September 15, 2011 06:21 — forked from sid137/test.coffee
.vimrc
" Many settings taken from
" http://nvie.com/posts/how-i-boosted-my-vim/
"
" Most general settings first
set nocompatible " Set Vim rather than Vi settings; must go first
set noeb " Set no audio or visual error beep
set bs=2
set bs=indent,eol,start " Allow backspacing over everything in insert mode
set history=1000 " Keep 1000 lines of command line history
set undolevels=1000
@brownman
brownman / tracks_controller.rb
Created November 30, 2011 13:31 — forked from adomokos/tracks_controller.rb
This code is to demonstrate how I use test doubles for Rails.
class TracksController < ApplicationController
def index
signed_in_user
end
def new
@track = Track.new
end
def create