やりたいこと
- 実行するコマンドを簡単に管理したい(コマンドラインで打てるコマンドをよしなに実行できる)
- YAMLとかで定義できるといい
- PRに出して簡単にレビュー可能
- 一回の実行で複数手順を順序を守って実行できる
- 実行したコマンドの履歴を管理し重複した実行を防ぐことができる
- capistrano経由でもローカルでも実行できるようにする * サーバーのroleやホスト指定で実行可能だが、ローカルでも実行可能
| == disasm: #<ISeq:<main>@./sample.rb>=================================== | == disasm: #<ISeq:<main>@./sample2.rb>================================== | |
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | |
| [ 1] a [ 1] a | |
| 0000 putspecialobject 3 ( 1) 0000 putspecialobject 3 ( 1) | |
| 0002 putnil 0002 putnil | |
| 0003 defineclass :A, <class:A>, 0 0003 defineclass :A, <class:A>, 0 | |
| 0007 pop 0007 pop | |
| 0008 getinlinecache 15, <is:0> ( 13) 0008 getinlinecache 15, <is:0> ( 13) | |
| 0011 getconstant :A 0011 getconstant :A | |
| 0013 setinlinecache <is:0> 0013 setinlinecache <is:0> |
| == disasm: #<ISeq:<main>@./sample2.rb>================================== | |
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | |
| [ 1] a | |
| 0000 putspecialobject 3 ( 1) | |
| 0002 putnil | |
| 0003 defineclass :A, <class:A>, 0 | |
| 0007 pop | |
| 0008 getinlinecache 15, <is:0> ( 13) | |
| 0011 getconstant :A | |
| 0013 setinlinecache <is:0> |
| == disasm: #<ISeq:<main>@./sample.rb>=================================== | |
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | |
| [ 1] a | |
| 0000 putspecialobject 3 ( 1) | |
| 0002 putnil | |
| 0003 defineclass :A, <class:A>, 0 | |
| 0007 pop | |
| 0008 getinlinecache 15, <is:0> ( 13) | |
| 0011 getconstant :A | |
| 0013 setinlinecache <is:0> |
| % ruby ruby_compile.rb | |
| compile file sample: | |
| == disasm: #<ISeq:<main>@./sample_test.rb>============================== | |
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | |
| [ 1] hoe | |
| 0000 putspecialobject 3 ( 1) | |
| 0002 putnil | |
| 0003 defineclass :Hoe, <class:Hoe>, 0 | |
| 0007 pop | |
| 0008 putnil ( 11) |
| % ruby ruby_compile.rb ~ | |
| compile file sample: | |
| == disasm: #<ISeq:<main>@./sample_test.rb>============================== | |
| local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | |
| [ 1] hoe | |
| 0000 putspecialobject 3 ( 1) | |
| 0002 putnil | |
| 0003 defineclass :Hoe, <class:Hoe>, 0 | |
| 0007 pop | |
| 0008 putnil ( 11) |
| #!/usr/bin/ruby | |
| #数値を16進数文字列に | |
| p 65.to_s(16) #=> "41" | |
| #数値をASCII文字に | |
| p 65.chr #=> "A" | |
| #文字列を16進数とみなして数値に | |
| p "41".hex #=> 65 |
| #include "Poco/Exception.h" | |
| #include "Poco/StreamCopier.h" | |
| #include "Poco/URI.h" | |
| #include "Poco/URIStreamOpener.h" | |
| #include "Poco/Net/HTTPStreamFactory.h" | |
| #include "Poco/Net/HTTPSStreamFactory.h" | |
| #include "Poco/Net/AcceptCertificateHandler.h" | |
| #include "Poco/Net/InvalidCertificateHandler.h" |
やりたいこと
| ================================== | |
| Mode: cpu(1000) | |
| Samples: 16 (0.00% miss rate) | |
| GC: 0 (0.00%) | |
| ================================== | |
| TOTAL (pct) SAMPLES (pct) FRAME | |
| 13 (81.2%) 5 (31.2%) #<Module:0x007fc52e865560>.timeout | |
| 8 (50.0%) 4 (25.0%) Net::HTTP#connect | |
| 3 (18.8%) 3 (18.8%) IO#read_nonblock | |
| 12 (75.0%) 1 (6.2%) Net::HTTP.get_print |
| ================================== | |
| Mode: wall(1000) | |
| Samples: 80 (13.98% miss rate) | |
| GC: 0 (0.00%) | |
| ================================== | |
| TOTAL (pct) SAMPLES (pct) FRAME | |
| 41 (51.2%) 41 (51.2%) Net::BufferedIO#rbuf_fill | |
| 61 (76.2%) 29 (36.2%) Net::HTTP#connect | |
| 1 (1.2%) 1 (1.2%) Net::HTTP#use_ssl? | |
| 1 (1.2%) 1 (1.2%) Net::HTTPGenericRequest#initialize |