2012-06-01から1ヶ月間の記事一覧

githug level14で詰まった

git

詰まったのでメモ こちらを見て解決しました. https://github.com/Gazler/githug/issues/70要するに.gitignoreを作る課題のところで.gitignore自体はすでに中身付きで存在するので, echo *.swp > .gitignoreとかやっちゃうともともとの中身が消えちゃうっ…

""と''

print "\n" print '\n' >> >>\nなんと地味な差

tweepy使用,public streamを垂れ流す

#coding:utf-8 import tweepy import sys consumer_key = '' consumer_secret = '' access_key = '' access_secret = '' class StreamListener(tweepy.StreamListener): def on_status(self, status): if sys.argv[1].decode('utf-8') in status.text: print…

perlのお勉強

ぼちぼちperlのお勉強をしています. 昨日はshift()等学んだ. my @a = (0, 1, 2); print shift(@a) >>0shiftは配列を引数にとりその第一要素を返す. 次のような場合は動作が異なる. sub a { my $x = shift // 1; # $xのデフォルト値の設定(引数(shift)…

cmdでのリダイレクト

D:\>cat test.txt aD:\>echo add >> test.txt D:\>cat test.txt a add'>>'で追記 D:\>echo overwrite > test.txt D:\>cat test.txt overwrite '>'で上書き