$ man test
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 -r webrick -e 'WEBrick::HTTPServer.new(:DocumentRoot => "./", :Port => 8080).start' | |
# 停止 | |
$ ps aux | grep ruby | |
$ kill -9 <pid> |
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
du -sh ./* | sort -nr |
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 1.9.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
git log --reverse | |
# show branch tag etc | |
git log --reverse --decorate |
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
lines = [ | |
['user_code', 'sex', 'zangyo', 'q1', 'q2'], | |
['0001', '1', 'none', '1', '3'], | |
['0002', '1', 'none', '1', '3'], | |
['0003', '1', 'none', '1', '3'], | |
['0004', '1', 'none', '1', '3'], | |
['0005', '1', 'none', '1', '3'] | |
] | |
heads = lines.shift.map(&:to_sym) |
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 D | |
attr_accessor :name, :elements | |
def initialize; yield self; end | |
def print | |
puts "#{@name}/" | |
elements.each {|e| e.print} | |
end | |
end | |
class F |
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
touch $(date +%Y-%m-%d-%H-%M).bak |
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
tree -aF |
NewerOlder