This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# プロキシ下でのgit設定。 | |
git config --global http.proxy http://www-proxy.example.net:8080/ | |
# コミット履歴をtree表示。 | |
[alias] | |
tree = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C( reset)' --abbrev-commit --date=relative | |
# エディターの設定。 | |
[core] | |
editor = /usr/bin/vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SETUP_SH_VMARGS="-Dfile.encoding=UTF8" | |
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home | |
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 | |
alias javac='javac -J-Dfile.encoding=UTF-8' | |
alias java='java -Dfile.encoding=UTF-8' | |
export _JAVA_OPTIONS='-Dfile.encoding=UTF-8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ virtualenv ENV #create virtual directly which includes local library and so on. | |
$ cd ENV | |
$ source bin/activate #activate virtual directly | |
You can see installed modules by | |
$ pip list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
#!/bin/sh | |
gcc -o hello hello.c | |
./hello | |
exit | |
#endif | |
#include <stdio.h> | |
int main( void ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ usermod -G wheel Taro # wheel グループにTaroを追加。 | |
$ cat /etc/passwd # centos内のユーザーを表示。 | |
$ tail -f /var/log/php_errors.log # phpのエラーログを表示。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -C "sample@gmail.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add foo git@github.com:akiniwa/hogesitory.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lha e dom.lzh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [] #空のリスト | |
l = list() #空のリスト | |
l = ["h", "e", "l", "l", "o"] | |
l.append(",") #最後に追加 | |
index = l.index("o") #要素の番号を返す | |
l.insert(index, "BOB") #indexに"BOB"を挿入 | |
l.pop() #最後の要素を削除 | |
l.remove("h") #要素"h"を削除 | |
del(l[0:3]) #0, 1, 2番の要素を削除 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
j1 = json.load(open("sample1.json")) | |
type(j1) | |
j2 = json.load(open("sample2.json")) | |
type(j2) | |
print j2["item"][0]["itemName"] |
OlderNewer