homebrewのuninstall手順
cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
homebrewのuninstall手順
cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew
日付からunixtimeを得るshellscriptコード | |
``` | |
$ date -d yesterday +%F | |
2013-05-17 | |
$ date -d 2013-05-17 +%s | |
1368716400 | |
``` |
crontab設定の時、EDITORをvimに指定してやると、vimの各種便利機能が使えて便利。 | |
つまりこんなかんじで実行。 | |
``` | |
EDITOR=vim && crontab -e | |
``` |
###assume-unchanged ファイルの変更を無視する。
git update-index --assume-unchanged filename
###no-assume-unchanged この設定を取り消す。
git update-index --no-assume-unchanged filename
As noted previously, pass in the --no-commit flag, but to avoid a fast-forward commit, also pass in --no-ff, like so:
$ git merge --no-commit --no-ff $BRANCH
This will allow you to examine/undo the merge, even if it is a fast-forward merge.
これで問題なければ後はcommitすればOK.
refs.[http://stackoverflow.com/questions/501407/is-there-a-git-merge-dry-run-option]
#splice 基本的に配列の要素削除を行う関数。
my @a = qw/10 20 30 40 50 60 70 80/;
my $n = 2;
my $m = 3;
###引数1つ
git log のoneline, statオプション
$ git log --oneline --stat
これをエイリアス登録
$ git config --global --add alias.ls 'log --oneline --stat'
一つ前のコミットを修正したいときは、 git commit --amend で事足りますが、複数commitを修正したいときには、rebase -iを使います。
3つ前のcommitまで指定。
$ git rebase -i HEAD~3
こんな編集画面になります。
git checkout "--" をつけることによって他のオプションなのかパスが来るのか判断している。
git checkout [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>.
こういうケースとかには "--" がないとつらい。
git checkout <tree-ish> <path1> <path2>
git checkout