Skip to content

Instantly share code, notes, and snippets.

View yuuichi-fujioka's full-sized avatar

yuuichi fujioka yuuichi-fujioka

View GitHub Profile
@yuuichi-fujioka
yuuichi-fujioka / add maven repo to eclipse workspace.sh
Last active December 15, 2015 13:39
mavenのリポジトリをEclipseのクラスパスに追加する
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repo
@yuuichi-fujioka
yuuichi-fujioka / git merge.sh
Created March 29, 2013 08:33
まとめてマージするコマンド
git merge --squash <other-branch> -m "comment"
git config --global color.ui auto
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
@yuuichi-fujioka
yuuichi-fujioka / remove file from git history.sh
Created April 8, 2013 01:45
履歴から特定のファイルを消す
git filter-branch -f --tree-filter 'rm -f *.txt' master
@yuuichi-fujioka
yuuichi-fujioka / wsgi hello world.py
Created April 8, 2013 21:52
8080ポートで受け付け、必ずHello Worldを返すwsgiアプリ http server
from wsgiref import simple_server
class Main(object):
def __call__(self, environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return 'Hello World'
if __name__ == '__main__':
@yuuichi-fujioka
yuuichi-fujioka / symbolic link.sh
Created April 8, 2013 21:59
現在のフォルダ配下にあるすべてのファイルのシンボリックリンクを${target}に作る(ディレクトリは作られないので注意)
@yuuichi-fujioka
yuuichi-fujioka / print current dir name.sh
Last active December 16, 2015 05:29
bashで現在のフォルダ名だけ取得
echo ${PWD##*/}
@yuuichi-fujioka
yuuichi-fujioka / routing.py
Created April 15, 2013 02:14
wsgi and mapper routing
from wsgiref import simple_server
from routes.mapper import Mapper
mapper = Mapper()
mapper.connect(None, '/Hoge/:id', action='hoge', conditions={'method':'GET'})
mapper.connect(None, '/Hoge/:id', action='detail', conditions={'method':'GET'})
mapper.connect(None, '/Hoge/:id', action='update', conditions={'method':'POST'})
def app(environ, start_response):
url = environ['PATH_INFO']
@yuuichi-fujioka
yuuichi-fujioka / git log date.sh
Created April 15, 2013 02:21
git log filters
git log --since=2011-2-6
git log --after=2011-2-6
git log --until=2011-2-6
git log --before=2011-2-6
git log --until=2011-2-6 --since=2011-2-4
@yuuichi-fujioka
yuuichi-fujioka / get all git tag.sh
Created April 15, 2013 02:34
gitのタグ取得 日付でソート付き
git for-each-ref --sort=taggerdate refs/tags