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
Error during failsafe response: "\xE4" from ASCII-8BIT to UTF-8 | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:104:in `write' | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:104:in `block in flush' | |
<internal:prelude>:10:in `synchronize' | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:101:in `flush' | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:121:in `auto_flush' | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:66:in `add' | |
/Users/ihower/github/rails/activesupport/lib/active_support/buffered_logger.rb:77:in `fatal' | |
/Users/ihower/github/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:139:in `block in log_error' | |
/Users/ihower/github/rails/activesupport/lib/active_support/deprecation/reporting.rb:15:in `silence' |
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
class Dragon | |
def test | |
"test" | |
end | |
end | |
d = Dragon.new | |
puts d.test # test | |
# 呼叫 super (1) |
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
class Dragon; end | |
# 使用 def 定義 class method | |
Dragon.instance_eval do | |
def foo | |
puts "bar" | |
end | |
end | |
Dragon.foo # bar |
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
<div class="map"> | |
<iframe width="350" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&source=embed&hl=zh-TW&msa=0&msid=101908379901557595242.00047f68df8db5ba850ee&ll=25.041749,121.613674&spn=0.037326,0.054932&z=14&output=embed"></iframe> | |
</div> | |
<div class="info"> | |
<div class="venue group"> | |
<h2>Venue</h2> | |
<div class="description"> | |
<h3>中央研究院 人文社會科學館 (人文館)</h3> |
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
#!/usr/local/bin/ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'railties' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' |
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
# This is not serious benchmark, you should read: | |
# | |
# http://jan.prima.de/plok/archives/175-Benchmarks-You-are-Doing-it-Wrong.html | |
# http://jan.prima.de/plok/archives/176-Benchmarks-You-are-Doing-it-Wrong.html | |
# http://books.couchdb.org/relax/reference/high-performance | |
# | |
# CouchDB v0.10.0 (via CouchDBX) on Macbook Pro 2.2 (Snow Leopard) | |
# | |
# 1000 times | |
# Round 1 |
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
#!/bin/bash | |
# Install Guide: | |
# 1. Use http://www.virtualbox.org if you use Windows or OS X | |
# 2. Download http://www.ubuntu.com 9.04 Desktop Edition and install into VM. | |
# 3. In your ubuntu console: | |
# $ wget http://gist.github.com/raw/212749/dfc34bd47732d25da0715a52aef2158cfba99d71/ruby_install_script_on_ubuntu | |
# $ chmod 555 ruby_install_script_on_ubuntu | |
# $ ./ruby_install_script_on_ubuntu | |
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
# rails foobar -m http://gist.github.com/202843.txt | |
run "rm README" | |
run "rm public/index.html" | |
run "rm -f public/javascripts/*" | |
run "rm -f publuc/images/*" | |
generate :controller, "welcome index" | |
route "map.root :controller => 'welcome'" | |
if yes?("Do you want to use BDD framework?") |
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
#!/bin/bash | |
# Install Guide: | |
# 1. Use http://www.virtualbox.org if you use Windows or OS X | |
# 2. Download http://www.ubuntu.com 9.04 Desktop Edition and install into VM. | |
# 3. In your ubuntu console: | |
# $ wget http://gist.github.com/raw/180820/333b288a1b5df8df09842bfcfa248fa252f0cf3b/rails_install_script_on_ubuntu | |
# $ chmod 555 rails_install_script_on_ubuntu | |
# $ ./rails_install_script_on_ubuntu |
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
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |