This file contains 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
config/database.yml | |
config/s3_credentials.yml | |
tmp/**/* | |
.DS_Store | |
doc/api | |
doc/app | |
doc/plugins | |
doc/*.dot | |
coverage/* | |
db/*.sqlite3 |
This file contains 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
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)" |
This file contains 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
RAILS_ROOT/config/environments/development.rb | |
config.gem "rails-footnotes" | |
environment.rb or | |
in an initializer do: | |
if defined?(Footnotes) | |
Footnotes::Filter.prefix = 'txmt://open?url=file://%s&line=%d&column=%d' |
This file contains 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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> | |
<cross-domain-policy> | |
<allow-access-from domain="*" /> | |
</cross-domain-policy> |
This file contains 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
require 'rubygems' | |
IRB.conf[:AUTO_INDENT] = false | |
IRB.conf[:USE_READLINE] = true | |
class Object | |
# easy way to list an object's methods without clutter | |
def local_methods | |
(methods - Object.instance_methods).sort | |
end | |
end |
This file contains 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
def a | |
puts 'a' | |
end | |
ma = method :a | |
mma=ma.to_proc | |
mmma = Kernel.send :define_method ,:new_method, &mma | |
mmma2 = Kernel.send :define_method ,:new_method2, mma | |
new_method | |
new_method2 |
This file contains 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
git config --global core.excludesfile ~/.git_global_ignore |
This file contains 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
# 30 minutes Lisp in Ruby | |
# Hong MinHee <http://dahlia.kr/> | |
# | |
# This Lisp implementation does not provide a s-expression reader. | |
# Instead, it uses Ruby syntax like following code: | |
# | |
# [:def, :factorial, | |
# [:lambda, [:n], | |
# [:if, [:"=", :n, 1], | |
# 1, |
This file contains 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
# Main sinatra app | |
require 'sinatra' | |
require 'activerecord' | |
require 'activesupport' | |
include ActionView::Helpers::DateHelper # add the required helpers here. | |
require 'controllers.rb' | |
# controllers.rb |
This file contains 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
git submodule add git://github.com/rails/rails.git vendor/rails | |
git submodule add git://github.com/rack/rack.git vendor/rack | |
git submodule add git://github.com/rails/arel.git vendor/arel | |
ruby vendor/rails/bin/rails new . --dev | |
#Generated Gemfile | |
#gem 'rails', :path => '/Users/zjia/.rvm/gems/ruby-1.9.2-p0/gems' | |
#gem 'arel', :git => 'git://github.com/rails/arel.git' |