This file contains hidden or 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
#!/usr/bin/perl | |
$ENV{'http_proxy'} =~ m|^https?://(.+?):?(\d+)?(/.*)?$|; | |
unless ($1 || $2) { | |
print "http_proxy is invalid\n"; | |
exit 1; | |
} | |
my $domain = $1; |
This file contains hidden or 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
#!/bin/sh | |
BASE_VERSION="5.6" | |
MINOR_VERSION="13-1" | |
VERSION="${BASE_VERSION}.${MINOR_VERSION}" | |
ARCH="el6.x86_64" | |
MYSQL_CLIENT="MySQL-client-${VERSION}.${ARCH}.rpm" | |
MYSQL_DEVEL="MySQL-devel-${VERSION}.${ARCH}.rpm" | |
MYSQL_EMBEDDED="MySQL-embedded-${VERSION}.${ARCH}.rpm" |
This file contains hidden or 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
# svn の branch 作成 | |
# git svn branch BRANCH_NAME | |
$ git svn branch test-branch | |
# remote branch 確認 | |
$ git branch -r | |
test-branch | |
trunk | |
# チェックアウト |
This file contains hidden or 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
ps aux | grep http[d] | awk '{ print "kill -9", $2}' | sh |
This file contains hidden or 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
# プロセスのカレントディレクトリを表示 | |
## unicorn (master) の場合 | |
ps aux | grep unicorn | grep master | awk '{ print $2; }' | while read pid; do ls -l /proc/$pid/cwd; done |
This file contains hidden or 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
ps axjf | awk '$1 != 0 && $1 != 2 {print}' |
This file contains hidden or 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
free -m | awk 'NR == 2 {printf("%d MB\n", $4+$6+$7);}' |
This file contains hidden or 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
# epel | |
# バージョンが古いので easy_install のほうが良い | |
yum install supervisor | |
# easy_install | |
yum install python-setuptools | |
# source build | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python |
This file contains hidden or 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
tai64nlocal < /path/to/log | |
cat /path/to/log | tai64nlocal | |
tailf /path/to/log | tai64nlocal |
This file contains hidden or 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
LUAJIT_VERSION=2.0.2 | |
wget "http://luajit.org/download/LuaJIT-$LUAJIT_VERSION.tar.gz" | |
tar zxvf LuaJIT-$LUAJIT_VERSION.tar.gz | |
cd LuaJIT-$LUAJIT_VERSION | |
make | |
make install PREFIX=/usr/local |