参加者(僕も含む)数人で講座は10回未満くらいのイメージ。 時間外で作ってくるのがメイン。
とりあえずPerlの場合
- Windowsの人はとりあえずMacを買いに行く
- cpanmの使い方
- スクリプト単体で or まずlocal::lib入れてから
tcpdump -s 65535 -xx -n -q -tttt port 80 > tcpdump.log | |
mk-query-digest --type http --filter '($event->{fingerprint} || "") =~ m/^get example\.com/' --limit 100% tcpdump.log |
tail -f access_log | awk '$9 == 500{print "\033[31m"}{print $0,"\033[0m"}' |
for i in host1 host2 host3; do echo $i; ssh $i "rm -fr /"; done |
while : ; do echo -n "`date` "; mysql -e 'show global status like "Queries";' | grep Queries; sleep 1; done | tee queries.log |
ssh host1 cat /path/to/file | diff -u /path/to/file - |
[~]$ mkdir .ssh | |
[~]$ chmod 600 .ssh | |
[~]$ mv ~/Downloads/riywo-test.pem ~/.ssh | |
[~]$ chmod 600 ~/.ssh/riywo-test.pem | |
[~]$ vim ~/.ssh/config | |
Host test-cf | |
HostName ec2-XX-XX-XX-XX.compute-1.amazonaws.com | |
User ec2-user | |
Port 22 | |
IdentityFile ~/.ssh/riywo-test.pem |
[ec2-user@domU-11-11-11-11-11-11 ~]$ sudo su - | |
[root@domU-11-11-11-11-11-11 ~]# vim /etc/ssh/sshd_config | |
Port 2222 | |
PermitRootLogin no | |
[root@domU-11-11-11-11-11-11 ~]# service sshd restart | |
[root@domU-11-11-11-11-11-11 ~]# netstat -taopn | |
Active Internet connections (servers and established) | |
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Timer | |
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN 1076/sshd off (0.00/0/0) |
<Directory /> | |
AuthUserFile /path/to/.htpasswd | |
AuthName "f0ck you" | |
AuthType Basic | |
Require valid-user | |
Satisfy Any | |
# Require valid-user 別のディレクティブで指定する場合 | |
Order deny,allow | |
Deny from all |
diff -u <(echo hoge) <(echo fuga) | |
--- /dev/fd/63 2011-03-04 12:44:34.176435837 +0900 | |
+++ /dev/fd/62 2011-03-04 12:44:34.176435837 +0900 | |
@@ -1 +1 @@ | |
-hoge | |
+fuga |