This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install rbenv | |
| brew install ruby-build | |
| brew install --HEAD https://raw.github.com/jasoncodes/homebrew/rbenv-vars/Library/Formula/rbenv-vars.rb # https://github.com/mxcl/homebrew/pull/7891 | |
| brew install readline | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile | |
| exec $SHELL -i # reload the shell | |
| CONFIGURE_OPTS="--disable-install-doc --with-readline-dir=$(brew --prefix readline)" rbenv install 1.9.3-p194 | |
| rbenv global 1.9.3-p194 | |
| gem install bundler rbenv-rehash git-up hitch gem-browse gem-ctags cheat awesome_print pry | |
| gem ctags |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source "https://rubygems.org" | |
| gem 'sprockets' | |
| gem 'sprockets-sass' | |
| gem 'sass' | |
| gem 'compass' | |
| gem 'bootstrap-sass' | |
| gem 'handlebars_assets' | |
| gem 'coffee-script' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ROOT | |
| assets/ | |
| javascripts/ | |
| application.js | |
| biz.js.coffee | |
| bar.js.coffee | |
| stylesheets/ | |
| application.css | |
| baz.css.scss | |
| foo.css.scss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example Usage: ruby froth.rb ": sq dup * ; 2 sq ." | |
| class Froth | |
| attr_reader :storage | |
| attr_accessor :trace | |
| WordDefinition = Struct.new(:name, :xt, :immediate) | |
| class WordDefinition | |
| def immediate? | |
| immediate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # mmm m m mmm mmm mmm mmmmm mmm | |
| # " # "m m m" #" # # " #" "# # # # #" # | |
| # m"""# #m#m# #"""" """m # # # # # #"""" | |
| # "mm"# # # "#mm" "mmm" "#m#" # # # "#mm" | |
| # | |
| # nginx configuration For Ruby/Rack web applications | |
| # | |
| # Cooked up with style, care and a bit of *secret* | |
| # nerdy spice. :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-0.8.52.tar.gz | |
| $ tar xzvf ./nginx-0.8.52.tar.gz | |
| $ rm ./nginx-0.8.52.tar.gz | |
| $ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc | |
| $ passenger-install-nginx-module | |
| # Automatically download and install Nginx? 2. No: I want to customize my Nginx installation | |
| # Where is your Nginx source code located?: /usr/src/nginx-0.8.52 | |
| # Where do you want to install Nginx to?: /opt/nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| begin | |
| require 'fsevent' | |
| rescue LoadError | |
| require 'rubygems' | |
| require 'fsevent' | |
| end | |
| class Puncher < FSEvent | |
| def initialize(command, files) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %w(rack tilt backports).map do |lib| | |
| require lib | |
| end | |
| %w(INT TERM).map do |sig| | |
| trap(sig){ $r.stop } | |
| end | |
| Sinatra = Module.new { | |
| extend Rack | |
| a = (Application = Builder.new) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project :test => :rspec, :orm => :activerecord, :script => :jquery, :renderer => :erb | |
| # admin interface | |
| generate :admin | |
| rake "ar:create ar:migrate" | |
| rake :seed | |
| git :init | |
| git :add, "." | |
| git :commit, "initial commit - admin interface" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project :test => :rspec, :orm => :mongoid | |
| generate :model, "account username:string password:string" | |
| generate :model, "post title:string body:string" | |
| generate :controller, "posts get:index get:new post:new" | |
| generate :migration, "AddEmailToAccount email:string" | |
| generate :controller, "accounts get:index" | |
| git :init | |
| git :add, "." | |
| git :commit, "initial commit" |