使い方
pctrl.sh l
pctrl.sh d [parameters]
| def a(p,n) | |
| (1..n).map{|m|"#{p}#{m}"}*"," | |
| end | |
| puts ["package object richTuple{",(2..21).map{|n|[" implicit def toRichTuple#{n}[#{t=a('A',n)}](t:(#{t}))= new{ | |
| def :::[B](b:B) = (b,#{t=a('t._',n)})",(2..22-n).map{|m|" def :::[#{b=a('B',m)}](p:(#{b})) = (#{a('p._', m)},#{t})"}, " }"]}.flatten, "}"]*($/*2) |
| require 'rspec' | |
| require 'rr' | |
| RSpec.configure do |config| | |
| config.mock_with :rr | |
| end | |
| class Sample | |
| def self.call | |
| 1 |
| http://example.com:3000/foo/index.html?bar=1 | |
| のときのRack::Requestのメソッドの値 | |
| request.fullpath #=> "/foo/index.html?bar=1" | |
| request.host #=> "example.com" | |
| request.host_with_port #=> "example.com:3000" | |
| request.path #=> "/foo/index.html" | |
| request.path_info #=> "/index.html" | |
| request.port #=> 3000 | |
| request.query_string #=> "bar=1" |
| パスワードをコマンドラインで入力するようにして、普通に ant release したら、入力したパスワードがコンソールに表示されたので、それを隠す方法 | |
| ----------------------------------------------------- | |
| build.xmlに以下を追加。 | |
| android SDKのtools/ant/build.xmlの一部を修正して、プロジェクトのbuild.xmlに追加 | |
| <target name="-release-prompt-for-password" if="has.keystore" unless="has.password"> | |
| <input |
| p | |
| = link_to("test link", '/?x=1&y=2') | |
| p | |
| == link_to("test link2", '/?x=1&y=2') | |
| p | |
| = link_to("test link3", :href => '/?x=1&y=2') | |
| p | |
| = link_to("test link4", '/?x=1&y=2'.html_safe) |
| ガンダムは燃え上がる | |
| ガンダムは燃え上がる | |
| ガンダムは燃え上がる | |
| ガンダムは走る | |
| ガンダムは巨大な敵を撃つ | |
| ガンダムは巨大な敵を撃つ | |
| ガンダムは巨大な敵を撃つ | |
| ガンダムは正義の怒りをぶつける | |
| 機動戦士 ガンダム ガンダム |
| _ = Object.new | |
| def _.==(obj) | |
| true | |
| end | |
| [ ["a", 1], ["a", 2], ["b", 1], ["b", 2], ["c", 1], ["c", 3] ].each do |v| | |
| pattern = case v | |
| when ["a", 1 ] then "a,1" | |
| when ["a", _ ] then "a,*" |
| sudo /usr/local/pound/sbin/poundctl -c /var/run/pound/poundctl.socket -H |awk ' | |
| /^ [ 0-9]*\. http Listener/ {l=$1} | |
| /^ [ 0-9]*\. Service/ {m=$1} | |
| /^ [ 0-9]*\. Backend/ {s = l""m""$0; gsub(/[ .]+/, " ", s); print s } | |
| ' |
| ;============================== | |
| ; 描画関連 | |
| ;============================== | |
| initVram: | |
| ld hl, Vram.topAddr2 | |
| ld (NextVramAddr), hl | |
| ret |