tmuxで起動するセッション定義を事前に設定できるツール
- tmux
- gem
# reference url: http://jp.rubyist.net/magazine/?0038-MapAndCollect#l2 | |
# map for lisp | |
# (map 'list (lambda (i) (+ i 1)) '(3 4 5 6)) | |
#map for ruby | |
p [3, 4, 5, 6].map {|i| i + 1 } #=>[4, 5, 6, 7] | |
#collect for smalltalk | |
# #(3 4 5 6) collect: [:i | i + 1 ] | |
#collect for ruby | |
p [3, 4, 5, 6].collect {|i| i + 1 } #=>[4, 5, 6, 7] |
# reference url: http://jp.rubyist.net/magazine/?0038-MapAndCollect#l2 | |
#reduce for lisp | |
# (reduce (lambda (i j) (+ i j)) '(3 4 5 6)) | |
#reduce for ruby | |
p [3, 4, 5, 6].reduce {|i, j| i + j } #=>18 | |
#inject for smalltalk | |
# #(3 4 5 6) inject: 0 into: [:i :j | i + j ] | |
#inject for ruby | |
p [3, 4, 5, 6].inject(0) {|i, j| i + j } #=>18 |
## surround.vim how to | |
# ds' | |
foo 'b*ar' baz #=>foo b*ar baz | |
# cs'" | |
foo 'b*ar' baz #=>foo "b*ar" baz | |
#ys$) | |
a = Array.new *foo, bar #=> a = Array.new (*foo, bar) |
#URL: http://d.hatena.ne.jp/conceal-rs/20100127/1264573975 | |
find . -type d -empty -not -path './.git*' -exec touch {}\/.gitkeep \; |
## | |
## SSL Virtual Host Context | |
## | |
NameVirtualHost *:443 | |
#以下コメントアウト |
#whats ElasticSearch Luceneベースの全文検索システム
#feature
##for example ###PUT
curl -XPUT http://localhost:9200/twitter/tweet/1 -d '{
<?php | |
class Test | |
{ | |
private $hoge = "hoge"; | |
public function __get($property) | |
{ | |
if(property_exists($this, $property)) { | |
return $this->$property; | |
} |
<?php | |
trait Accessors | |
{ | |
public function __get($property) | |
{ | |
if(property_exists($this, $property)) { | |
return $this->$property; | |
} | |
} |
Dir.glob("controllers/*.rb").each { |r| require_relative r } |