Skip to content

Instantly share code, notes, and snippets.

View saitara's full-sized avatar

Yasuyuki SAITARA Saito saitara

View GitHub Profile
@saitara
saitara / file0.txt
Last active August 29, 2015 14:18
LinuxでRPS/RFS/XPSを使いたい方へのシェルスクリプト ref: http://qiita.com/saitara/items/aabb9c8869079ceb96a2
#!/bin/sh
for if in `ls /sys/class/net`; do
I=0
for q in `ls /sys/class/net/${if}/queues/tx-*/xps_cpus`;do
echo 2^${I}|bc > ${q}
I=${I}+1
done
done
echo "obase=16;2^$(cat /proc/cpuinfo | grep ^processor|wc -l)-1"| bc > /sys/class/net/eth0/queues/rx-0/rps_cpus
@saitara
saitara / file0.txt
Last active March 23, 2017 08:44
AWSで全てのリージョンから無駄リソースを抽出するワンライナー ref: http://qiita.com/saitara/items/a1e3422042a2ec2fb8d7
for region in `aws ec2 describe-regions --query 'Regions[].RegionName' --output text`;do aws ec2 describe-volumes --region ${region} --filters Name=attachment.status,Values=detached;done
@saitara
saitara / file0.txt
Last active August 29, 2015 14:18
古めのCentOS(HVM)でSR-IOVに対応させる ref: http://qiita.com/saitara/items/82f7303cad2fbabba7b1
yum install -y kernel-devel-`uname -r` kernel-headers-`uname -r`
@saitara
saitara / file0.txt
Last active August 29, 2015 14:15
非常に安易なnginx reverse proxyの作り方 ref: http://qiita.com/saitara/items/7db1c47fafb18124cd87
tmpfs /var/cache/nginx tmpfs defaults,noatime,mode=1777,size=20% 0 0
@saitara
saitara / file0.txt
Created February 23, 2015 03:42
waf(weighttp)作成時にライブラリを入れてるのに見つからないと言われたら ref: http://qiita.com/saitara/items/f5a9192825026a4051fe
# C_INCLUDE_PATH=/usr/include/libev ./waf configure
Checking for program gcc,cc : ok /usr/bin/gcc
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for gcc : ok
Checking for library ev : ok
Checking for header ev.h : ok
Checking for library pthread : ok
Checking for header pthread.h : ok
@saitara
saitara / file0.txt
Last active August 29, 2015 14:15
AWS HVMでディスク拡張するときの注意点 ref: http://qiita.com/saitara/items/7f1d497641067043df76
yum install cloud-utils-growpart -y
LC_ALL="en_US.UTF-8" growpart /dev/sda 1
reboot
@saitara
saitara / file0.txt
Last active August 29, 2015 14:15
AWSの侵入テストを同一VPCで完結したい場合の申請方法 ref: http://qiita.com/saitara/items/cf31d08cd92e1c2215be
Hello,
Thank you for contacting us. We have received your request for authorization for penetration testing.
Your request as detailed below has been approved.
Your authorization number is: XXXXXXXXXX
As a reminder,
- you have agreed to abide by the Terms and Conditions and AWS’s Procedures Regarding the Use of Security Assessment Tools and Services. You can review what you have agreed to at https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/AWSSecurityPenTestRequest
- you have agreed to abide by Amazon Web Services Customer Agreement available at http://aws.amazon.com/agreement/