- Tatsuhiro Ujihisa
- http://ujihisa.blogspot.com/
- 非同期とは?
- スレッド、プロセス
- プロセス生成
| # INFO extracted from : http://stackoverflow.com/questions/6331065/matching-balanced-parenthesis-in-ruby-using-recursive-regular-expressions-like-pe | |
| require 'wikipedia' | |
| wikipage = Wikipedia.find(title) | |
| # This regular expression is not valid for infoboxes with '}' (i.e: http://en.wikipedia.org/wiki/The_Royal_Anthem_of_Jordan) | |
| no_infoboxes = wikipage.content.gsub(/\{\{[^\}]*\}\}/, "") | |
| # This regular expression makes use of recursive regular expressions so now handles recursive {{}} structures | |
| no_infoboxes = wikipage.content.gsub(%r{(?<re>\{\{(?:(?> [^\{\}]+ )|\g<re>)*\}\})}x, "") |
| #!/bin/sh | |
| PREFIX="from now" | |
| MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`" | |
| get_amend() { | |
| if [ -z `git log --pretty=oneline -1 | cut -d " " -f 2- | grep "^\[${PREFIX}]"` ] | |
| then | |
| return 1 | |
| fi |