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
my $dbh = DBI->connect('dbi:mysql:test','test','test', { | |
RaiseError => 1, | |
Callbacks => { | |
ChildCallbacks => { | |
execute => sub { | |
my ($obj, @binds) = @_; | |
my ($package, $file, $line) = caller; | |
$obj->{Database}->{Statement} .= "/* $package:$file:$line */"; | |
return; | |
}, |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
exit if(@ARGV != 2); | |
my $file1 = $ARGV[0]; | |
my $file2 = $ARGV[1]; | |
my %data1; |
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
source('Rworker.r') | |
file <- rworker_download(args$data) | |
rworker_log(paste("Download finished:", file)) | |
d <- read.csv(file, header = T) | |
rworker_log("read.csv finished:") | |
png(args$img) | |
plot(d) |
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
speed | dist | |
---|---|---|
4 | 2 | |
4 | 10 | |
7 | 4 | |
7 | 22 | |
8 | 16 | |
9 | 10 | |
10 | 18 | |
10 | 26 | |
10 | 34 |
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
# ifstat -b -t -i bond0,eth0,eth1 1 5 | |
Time bond0 eth0 eth1 | |
HH:MM:SS Kbps in Kbps out Kbps in Kbps out Kbps in Kbps out | |
18:46:33 11248.00 19186.19 11166.92 19186.19 81.08 0.00 | |
18:46:34 10672.05 17935.01 10589.01 17935.01 83.04 0.00 | |
18:46:35 10908.38 21413.09 10837.35 21413.09 71.03 0.00 | |
18:46:36 10786.80 18413.89 10739.27 18413.89 47.53 0.00 | |
18:46:37 11408.11 18082.65 11339.09 18082.65 69.02 0.00 |
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
#!/bin/sh | |
SEC=$1 | |
tcpdump -s 65535 -nn -q -tttt -x port 3306 -l > /tmp/tcpdump.3306 2> /dev/null & | |
PID_3306=$! | |
tcpdump -s 65535 -nn -q -tttt -x port 11211 -l > /tmp/tcpdump.11211 2> /dev/null & | |
PID_11211=$! |
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
#!/bin/sh | |
exec mk-slave-delay --delay 3s --interval 1s h=localhost,u=root,p=password &>/dev/null |
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
tail -f access_log | awk '$9 == 500{print "\033[31m"}{print $0,"\033[0m"}' |
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
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 |
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
for i in host1 host2 host3; do echo $i; ssh $i "rm -fr /"; done |
OlderNewer