Skip to content

Instantly share code, notes, and snippets.

View ponko2's full-sized avatar

Takahito Nakano ponko2

  • Shizuoka, Japan
  • 10:02 (UTC +09:00)
View GitHub Profile
@ponko2
ponko2 / gist:8468613
Last active January 3, 2016 13:19
Cygwinのdotfilesをhomesickで管理する
C:¥Windows¥system32¥cmd.exe /c <symlink>…™/
指定されたファイルが見つかりません。
shell returned 1
Hit any key to close this window...
@ponko2
ponko2 / custom.zsh
Created March 20, 2013 17:41
oh-my-zshの設定ファイル
# 補完候補を詰めて表示
setopt list_packed
# カッコの対応などを自動的に補完
setopt auto_param_keys
# ディレクトリ名の補完で末尾の / を自動的に付加し、次の補完に備える
#setopt auto_param_slash
# ファイル名の展開でディレクトリにマッチした場合末尾に / を付加する
@ponko2
ponko2 / .gvimrc
Last active December 15, 2015 05:09
" Initialize: "{{{
let s:is_windows = has('win16') || has('win32') || has('win64')
let s:is_cygwin = has('win32unix')
let s:is_mac = !s:is_windows && !s:is_cygwin
\ && (has('mac') || has('macunix') || has('gui_macvim') ||
\ (!executable('xdg-open') &&
\ system('uname') =~? '^darwin'))
"}}}
@ponko2
ponko2 / .vimrc
Last active December 15, 2015 05:09
" Initialize: "{{{
" Enable no Vi compatible commands.
set nocompatible
let s:is_windows = has('win16') || has('win32') || has('win64')
let s:is_cygwin = has('win32unix')
let s:is_mac = !s:is_windows && !s:is_cygwin
\ && (has('mac') || has('macunix') || has('gui_macvim') ||
\ (!executable('xdg-open') &&
@ponko2
ponko2 / file0.sh
Created January 17, 2012 02:43
Git で空のディレクトリを管理する ref: http://qiita.com/items/1750
# 空のディレクトリに .gitkeep を追加する
find . -type d -not -path './.git*' -empty -print0 | xargs -0I% touch %/.gitkeep
@ponko2
ponko2 / pdf2jpg.sh
Created January 12, 2012 13:33
PDFをJPEGファイルに変換する
# PDFを縦幅1500pxの3桁0埋め連番JPEGファイルに変換する
convert -density 300 -resize x1500 -verbose *.pdf %03d.jpg
@ponko2
ponko2 / .zshrc
Created January 9, 2012 11:40
.git ディレクトリを除外して find を行えるようにする関数 ref: http://qiita.com/items/1615
function git-find() {
find $1 \( -type d -name '.git' -prune \) -or \( $*[2,-1] -print \)
}
function git-find0() {
find $1 \( -type d -name '.git' -prune \) -or \( $*[2,-1] -print0 \)
}
@ponko2
ponko2 / file0.sh
Created January 8, 2012 08:44
git merge で常に --no-ff ref: http://qiita.com/items/1605
# master 上で git merge するときは常に --no-ff
git config branch.master.mergeoptions "--no-ff"
## あわせて設定しておくと吉
# master 上で git pull するときは常に rebase
git config branch.master.rebase true
@ponko2
ponko2 / file0.sh
Created January 8, 2012 08:25
pull のときは常に rebase する ref: http://qiita.com/items/1604
# master 上で git pull するときは常に rebase
git config branch.master.rebase true
# 全ブランチで rebase を使う
git config --global branch.autosetuprebase always
@ponko2
ponko2 / remote-diff.sh
Created January 4, 2012 11:20
リモートとローカルのファイルでdiffを取る ref: http://qiita.com/items/1567
ssh user@host cat /path/to/remotefile | diff /path/to/localfile -