超雑にまとめました。修正してください。
登場人物
- アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
- 後輩: 頼んでばっかしで役に立たない。
- サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
- プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
git branch -a | grep origin | cut -d / -f 3 | grep -v master | \ | |
ruby -e "STDIN.to_a.tap(&:shift).map(&:chomp).each {|s| p %|git push origin :#{s}| }" | |
# replace `p` with `system` to run actual command |
Every time I upgrade libxml2 via Homebrew, running cucumber test will post an annoying warning message
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.8.0
To fix it:
$ gem uninstall nokogiri
$ brew link libxml2
$ gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26
phpbrew install php-5.4.2 +mysql +pdo +apxs2=/opt/local/apache2/bin/apxs +ftp +pgsql=/opt/local/lib/postgresql91 +sqlite+imap+ipc+pcntl+calendar |
import Data.List | |
data Suit = Spade | Diamond | Club | Heart | |
deriving (Eq, Show, Ord) | |
data Card = Card Suit Int | |
deriving (Eq, Show, Ord) | |
suit (Card s _) = s | |
rank (Card _ r) = r |
module Roman | |
CHAR = "IVXLCDM" | |
def self.to_num n | |
return "" if n <= 0 || 5000 <= n | |
str = sprintf("%04d", n).reverse! | |
res = '' | |
4.times do|i| | |
res = "#{roman_char(str[i], i*2)}#{res}" | |
end | |
res |
class Fixnum | |
def to_roman | |
return "" unless (1..3999).include?(self) | |
digit_count = Math.log(self, 10).to_i | |
case digit_count | |
when 0 | |
minor = "I" | |
major = "V" |
# digit : 一桁の数字 | |
# roman : その桁の1, 5, 10を表す文字三文字 (ex: 'IVX') | |
def digit2roman(digit, roman) | |
a, b, c = roman.split(//) | |
case digit | |
when 0 then '' | |
when 1..3 then a * digit | |
when 4 then a + b | |
when 5 then b |
;;; anything | |
(setq anything-command-map-prefix-key "C-x C-a") | |
(require 'anything) | |
;; C-z は C-; で実行できるようにする | |
(define-key anything-map (kbd "C-;") 'anything-execute-persistent-action) | |
(define-key anything-map (kbd "M-;") 'anything-execute-persistent-action) | |
(require 'anything-startup) | |
(dolist (map (list | |
anything-map | |
anything-c-buffer-map |