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
| 16.times.map { rand(1 + ?~.ord - _ = ?!.ord) + _ }.pack('c*') |
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
| ... does not appreciate my needs 私のニーズに合わない | |
| as a ... who do ... 〜をするAとして |
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
| module Amida | |
| class App | |
| START_CHAR = 65 | |
| def header(column) | |
| chars = (START_CHAR...(START_CHAR + column)).map(&:chr) | |
| chars.join(' ') + "\n" + | |
| bar_row_string(column) | |
| end |
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
| require 'benchmark' | |
| require 'set' | |
| source = 100000.times.map { rand(100) } | |
| n = 100 | |
| Benchmark.bm(5) do |x| | |
| x.report('uniq') do n.times { source.uniq } end | |
| x.report('uniq!') do n.times { source.uniq! } end | |
| x.report('set') do n.times { Set.new(source) } end |
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 StackEmptyError < StandardError | |
| end | |
| class StackOverflowError < StandardError | |
| end | |
| class SymbolStack | |
| def initialize | |
| @stack = [] | |
| end |
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
| describe SymbolStack do | |
| context 'when stack is empty' do | |
| its (:size) { should eq 0 } | |
| describe 'SymbolStack#push' do | |
| context 'with symbol' do | |
| it 'increments stack size' do | |
| expect { subject.push(:data) }. | |
| to change { subject.size }.from(0).to(1) | |
| end |
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
| describe 'テスト対象' do | |
| context '状態' do | |
| describe 'テスト対象メソッド' do | |
| context '与える入力' do | |
| it '期待する出力' | |
| end | |
| end | |
| end | |
| end |
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
| バイナリログの表示 | |
| $ sudo mysqlbinlog --no-defaults --character-set=utf8 /var/lib/mysql/log-bin.000001 | |
| バイナリログのローテート | |
| mysql> flush logs | |
| もしくは | |
| $ sudo pkill -HUP mysqld |
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
| <!-- =========================================================== --> | |
| <!-- Configure Request Log --> | |
| <!-- Request logs may be configured for the entire server here, --> | |
| <!-- or they can be configured for a specific web app in a --> | |
| <!-- contexts configuration (see $(jetty.home)/contexts/test.xml --> | |
| <!-- for an example). --> | |
| <!-- =========================================================== --> | |
| <Ref id="RequestLog"> | |
| <Set name="requestLog"> | |
| <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog"> |
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
| ;; GNU Emacs 23.3.1 (x86_64-apple-darwin11.1.0, NS apple-appkit-1138.00) of 2011-10-03 | |
| ;; load-path | |
| (setq load-path | |
| (append '("/usr/local/Cellar/emacs/23.3a/share/emacs/site-lisp/apel" | |
| "/usr/local/Cellar/emacs/23.3a/share/emacs/site-lisp/skk" | |
| "/Users/takai/Src/elisp/rinari" | |
| "/Users/takai/Src/elisp/rhtml" | |
| "/Users/takai/Src/elisp/haml-mode" | |
| "/Users/takai/Src/elisp/sass-mode" | |
| "/Users/takai/Src/elisp/coffee-mode" |