Skip to content

Instantly share code, notes, and snippets.

View Jwata's full-sized avatar
🌴
On vacation

Junji Watanabe Jwata

🌴
On vacation
View GitHub Profile
Usage: gist [options] [filename or stdin] [filename] ...
Filename '-' forces gist to read from stdin.
-p, --[no-]private Make the gist private
-t, --type [EXTENSION] Set syntax highlighting of the Gist by file extension
-d, --description DESCRIPTION Set description of the new gist
-o, --[no-]open Open gist in browser
-m, --man Print manual
-v, --version Print version
-h, --help Display this screen
Usage: gist [options] [filename or stdin] [filename] ...
Filename '-' forces gist to read from stdin.
-p, --[no-]private Make the gist private
-t, --type [EXTENSION] Set syntax highlighting of the Gist by file extension
-d, --description DESCRIPTION Set description of the new gist
-o, --[no-]open Open gist in browser
-m, --man Print manual
-v, --version Print version
-h, --help Display this screen
Usage: gist [options] [filename or stdin] [filename] ...
Filename '-' forces gist to read from stdin.
-p, --[no-]private Make the gist private
-t, --type [EXTENSION] Set syntax highlighting of the Gist by file extension
-d, --description DESCRIPTION Set description of the new gist
-o, --[no-]open Open gist in browser
-m, --man Print manual
-v, --version Print version
-h, --help Display this screen
Usage: gist [options] [filename or stdin] [filename] ...
Filename '-' forces gist to read from stdin.
-u, --url Gist URL
-p, --[no-]private Make the gist private
-t, --type [EXTENSION] Set syntax highlighting of the Gist by file extension
-d, --description DESCRIPTION Set description of the new gist
-o, --[no-]open Open gist in browser
-l, --login Set up an OAuth token.
-m, --man Print manual
-v, --version Print version
function! PearErrorSnipet()
let l:cursor_word = expand("<cword>")
let l:text = printf("if (PEAR::isError($err = $%s)) {", l:cursor_word)
exe "norm! o" . l:text
let l:text = "return $err;"
exe "norm! o" . l:text
let l:text = "}"
exe "norm! o" . l:text
endfunction
@Jwata
Jwata / gist:5132817
Created March 11, 2013 08:31
raid設定
3947 // {{{ RAID22 The Only Family Left 2013-01-07
3948 22 => array(
3949 // --- 全体設定 ------------------------------------------------ //
3950 'id' => 22,
3951 'type' => GREE_SERVICE_ZETA_EVENT_TYPE_SOLO_COMPLETION,
3952 'title' => 'Bodysnatchers of the High Seas',
3953 'event_name' => 'Bodysnatchers of the High Seas',
3954 'start_date' => '2013-01-07 07:00:00',
3955 'end_date' => '2013-01-17 01:59:59',
3956 'group' => true, // グループイベントかどうか (trueの場合はバッチが動く)
# try to send 10 times http request to AWS (US West Virginia )
~% for i in `seq 1 10`;do curl -kL http://ec2-54-88-204-250.compute-1.amazonaws.com/ -o /dev/null -w "%{http_code}\t%{time_total}\n" 2> /dev/null;done
200 0.370
200 0.501
200 0.429
200 0.362
200 0.378
200 0.363
200 0.374
200 0.387
select t1.job_posting_id from (select jp.id as job_posting_id from job_posting jp where jp.`valid_to` > '2015-03-03 00:34:52.404' AND jp.`occupation_type` IN ('restaurant') AND NOT jp.`occupation_type` = 'night') t1
inner join
(
select job_posting_id from
(select l.job_posting_id from location l where l.locality_id IN (1113)) t2
inner join
(select f.job_posting_id from feature f where f.title IN ('dailypayment')) t3
using (job_posting_id)
) t4
using (job_posting_id)
junji_watanabe@MAC0012-2140272 ~/Development/CareerCompass% cat requirements_2.txt
【必須要件】
・WEBシステムの設計、実装、テスト、メンテナンスにおける深い経験
・データベースの設計、運用管理経験
・LAMP、CakePHPに精通
・JavaScript、CSS、HTML5についての専門的知識
【求める人物像】
・チームワークを尊重し、成果を出すために貢献できる方
・あいまいな状況の中でも前進し、変化に柔軟かつ迅速に対応できる方
@Jwata
Jwata / parse.py
Last active August 29, 2015 14:26
import MeCab
from gensim import corpora, models, similarities
file_name = 'requirements_3.txt'
mecab = MeCab.Tagger("-Ochasen -d /usr/local/Cellar/mecab/0.996/lib/mecab/dic/mecab-ipadic-neologd/")
with open(file_name) as f:
all_tokens = []
for line in f: