Skip to content

Instantly share code, notes, and snippets.

View fapestniegd's full-sized avatar

James S White fapestniegd

View GitHub Profile
heath: nice.
#!/bin/bash
# redrat3 on Debian 5.0.4 (lenny)
apt-get install -y cvs build-essential dialog automake libtool help2man \
libx11-dev expect linux-headers-$(uname -r)
TMPDIR=$(mktemp -d /tmp/redrat-lirc.XXXX)
cd ${TMPDIR}
cat<<EOF | /usr/bin/expect
spawn cvs -d:pserver:[email protected]:/cvsroot/lirc login
expect "CVS password:"
send "\n\r"
for ns in ns01 ns02 ns03;do
result=$(dig +short @${ns}.websages.com www.ogtastic.com);
echo "${ns}: ${result}";
done
ldapsearch -LxH ldaps://freyr.websages.com:636 -b "ou=DNS,dc=ogtastic,dc=com" -D "uid=whitejs,ou=People,dc=websages,dc=com" -w ${LDAP_PASSWORD} -s sub "(objectclass=*)" | grep zoneName| awk '{print $NF}'| sort -u | while read line; do echo "$line:";for ns in ns01 ns02 ns03;do result=$(dig +short @${ns}.websages.com ${line}); echo " - ${ns}: ${result}";done;done | gist
skrs0004.cao.eftdomain.net [Fri Nov 5 11:24:09 CDT 2010]
######################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
# 1.3.6.1.4.1.32372 <- websages
# 1.3.6.1.4.1.32372.1 <- websages.1:
# 1.3.6.1.4.1.32372.3 <- websages.hortoncd:
# 1.3.6.1.4.1.32372.37 <- websages.heathsmom:
# 1.3.6.1.4.1.32372.1.1 <- Version 1:
# 1.3.6.1.4.1.32372.1.1.1 <- LDAP:
# 1.3.6.1.4.1.32372.1.1.1.1 <- Revision 1:
# 1.3.6.1.4.1.32372.1.1.1.1.1 <- Configuration Items:
# 1.3.6.1.4.1.32372.1.1.1.1.1.1 <- Configuration Attributes:
:0 c
* ^Received: .*for <nagios.mail.check*
| /usr/bin/formail -c -XFrom: -XReceived: | perl -e 'while(<STDIN>){ if(m/From:\s+(.*)/){ $from=$1; }if(m/Received:.*for <nagios.mail.check@(.*)>/){ $to=$1; } } print "$to\t$to mail routing\tOK\tmail received from $from\n";' | /usr/sbin/send_nsca -H 127.0.0.1 -c /etc/send_nsca.cfg
Twitter commands
Do more than Tweet! Send these commands to Twitter:
FOLLOW username
Start following a user
UNFOLLOW username
Stop following a user
ON/OFF
Turn all Tweet notifications on or off
#!/bin/sh
DATE=`date`
clear; echo "$1 [${DATE}]"
while [ 1 ]; do
ping -c1 -i1 $1 > /dev/null 2>&1 && /bin/echo -n "#" || /bin/echo -n "_"
sleep 3
done