Skip to content

Instantly share code, notes, and snippets.

View PharaohKJ's full-sized avatar
👺
Ten-goods come on! Working from home

ふぁらお加藤 PharaohKJ

👺
Ten-goods come on! Working from home
View GitHub Profile
net_tools_deprecated_message () {
echo -n 'net-tools コマンドはもう非推奨ですよ?おじさんなんじゃないですか? '
}
arp () {
net_tools_deprecated_message
echo 'Use `ip n`'
}
ifconfig () {
net_tools_deprecated_message
# addgreether REMOTE_IP LOCAL_IP GRE_KEY LOCAL_SLICE_IP
ip link add gre1 type gretap remote ${1} local ${2} key ${3}
ip addr add ${4} dev gre1
ip link set gre1 up
ip link set gre1 mtu 1450
% git clone https://github.com/keiko713/rails-todo.git
% cd rails-todo
% bundle install --without production
% foreman run bundle exec rake db:migrate
% foreman start
localhost:5000 で確認する。
@PharaohKJ
PharaohKJ / gist:9701d26f42958f32c65e
Created June 10, 2014 11:09
archive_fix_file_only
git archive --format=zip --prefix=root/ HEAD `git diff --name-only HEAD HEAD^` -o archive.zip
katoh$ ab -n 1000 -c 100 http://blog.phalanxware.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.phalanxware.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
apr_socket_recv: Connection timed out (110)
katoh$ ab -n 100 -c 10 http://blog.phalanxware.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.phalanxware.com (be patient).....done
Server Software: nginx/1.4.4
Server Hostname: blog.phalanxware.com
@PharaohKJ
PharaohKJ / .bashrc
Created August 26, 2013 23:23
ubuntu PS1
PS1="\\[\\033[32m\\][\\h: \\w]\\[\\033[0m\\]\\n\\u\\\$ "
@PharaohKJ
PharaohKJ / iptables
Created August 3, 2013 07:04
Asset Server 向け iptables設定
# 外部からTCPポート10733番(Unity Asset Server接続)へのアクセスを許可
-A Firewall-setting1-INPUT -m state --state NEW -m tcp -p tcp --dport 10733 -j ACCEPT
@PharaohKJ
PharaohKJ / .bashrc
Created June 28, 2013 12:27
osx bashrc
# プロンプトの設定
PS1='\[\033[0;32m\w\[\033[0m\n[\u]\$ '
@PharaohKJ
PharaohKJ / randompass.sh
Created June 22, 2013 08:34
A-Za-z0-9_でのパスワード生成シェル 数字は文字数
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 12 | xargs