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
# 少し凝った zshrc | |
# License : MIT | |
# http://mollifier.mit-license.org/ | |
######################################## | |
# 環境変数 | |
export LANG=ja_JP.UTF-8 | |
# 色を使用出来るようにする |
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
$ /usr/bin/ruby -v a.rb | |
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] | |
Arguments received by method: | |
arg_1: [1, 2, 3] | |
arg_2: [] | |
Arguments received by lambda: | |
arg_1: [1, 2, 3] | |
arg_2: [] |
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
class Foo | |
def hi; end | |
def bar | |
hi if @flag | |
@flag = true | |
end | |
end | |
describe 'some' do |
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
" Knuth Subtractive Random Number Generator | |
let s:knuth_random = { 'index': 0, 'state': repeat([0], 56) } | |
function! s:knuth_random.seed(seed) dict | |
let l:seed = 161803398 - (a:seed < 0 ? -a:seed : a:seed) | |
let self.state[55] = l:seed | |
let [l:i, l:j, l:k] = [0, 0, 1] | |
for l:i in range(1, 54) | |
let l:j = (21 * l:i) % 55 |
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 -v -rdebug -rubygems -e 0 (~) | |
ruby 1.9.2dev (2009-12-27 trunk 26184) [x86_64-darwin10.2.0] | |
Debug.rb | |
Emacs support available. | |
ruby:0: `' (NilClass) | |
from /opt/ruby/trunk/lib/ruby/1.9.1/debug.rb:661:in `excn_handle' | |
from /opt/ruby/trunk/lib/ruby/1.9.1/debug.rb:715:in `trace_func' | |
from /opt/ruby/trunk/lib/ruby/1.9.1/debug.rb:905:in `block in <class:DEBUGGER__>' | |
from ruby:0:in `set_encoding' |