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 -w | |
die "usage $0 <path to email list>\n" unless @ARGV; | |
my $file=$ARGV[0]; | |
my @queue=`postqueue -p |grep -v ^- |awk 'BEGIN{RS="\\n\\n"} ; {print \$1"\t"\$NF}'`; | |
my @list_users=`cat $file`; |
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/ruby | |
raise "usage #{$0} <path to email list>\n" unless ARGV.count > 0; | |
file=ARGV[0]; | |
# postqueue -p prints the existing postfix queue | |
# this awk was just a cheap way to regex using its record separator for multiple newlines. | |
queue=`postqueue -p |grep -v ^- |awk 'BEGIN{RS="\\n\\n"} ; {print \$1"\t"\$NF}'`; |
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 LWP::UserAgent; | |
# the junk you may need to change | |
my @importantusers = qw( sales customersupport support and_any_other_critical_address ); | |
my @importantdomains = qw( someimportantdomain.com somevanitydomain.com whatever.com ); | |
my $api_user = 'username'; | |
my $api_key = 'password'; |
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
### The pain after a host is updated: | |
lo@padlet:~/someproject$ git pull | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
The RSA host key for repo.somedomain.com has changed, | |
and the key for the corresponding IP address x.x.x.x | |
is unchanged. This could either mean that | |
DNS SPOOFING is happening or the IP address for the host |
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
l:~/agent-plugins# ./log_freshness.py | |
Usage: ./log_freshness.py <log file to check> | |
l:~/agent-plugins# ./log_freshness.py /var/log/apache2/access.log | |
status ok everything looks good, modified 163 seconds ago | |
l:~/agent-plugins# ./log_freshness.py /var/log/apache2/error.log | |
status err /var/log/apache2/error.log not modified in 2745 seconds |
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
l:~/haproxyctl# ./haproxyctl "show health" | |
# pxname svname status weight | |
http FRONTEND OPEN | |
sinatra sinatra_downoi DOWN 1 | |
sinatra sinatra_rindica DOWN 1 | |
sinatra sinatra_guinea UP 1 | |
sinatra BACKEND UP 1 | |
ei guinea UP 1 | |
ei BACKEND UP 1 | |
drop guinea UP 1 |
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
alias ll='ls -l' | |
#alias la='ls -A' | |
#alias l='ls -CF' | |
alias b='sudo' | |
alias white='aterm -fg black -bg white +sb &' | |
alias x='startxfce4' | |
alias compiz='SKIP_CHECKS=yes LIBGL_ALWAYS_INDIRECT=1 INTEL_BATCH=1 compiz --replace --indirect-rendering &' |
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
Commands: | |
Make bucket | |
s3cmd mb s3://BUCKET | |
Remove bucket | |
s3cmd rb s3://BUCKET | |
List objects or buckets | |
s3cmd ls [s3://BUCKET[/PREFIX]] | |
List all object in all buckets | |
s3cmd la | |
Put file into bucket |
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 ticket... | |
lo@puter:~/blueprint$ make clean | |
rm -f \ | |
control \ | |
blueprint/**.pyc \ | |
man/man*/*.[12345678] man/man*/*.html | |
lo@puter:~/blueprint$ make | |
make: Nothing to be done for `all'. |
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
SELECT CONCAT( | |
CONCAT("{'key':",column1,","), | |
CONCAT("'field2name':",column2,","), | |
CONCAT("'field3name'",column3,"}") | |
) FROM table |