multiple programs reading a single stream

So i had to grep multiple patterns into their own files from one stream and had forgotten about this and was trying to do this with awk & sed (which got very ugly really fast). instead, we just need tee, grep, and bash extensions. example: tee <srv1_20140912.log >(grep “access” >20140912_access.txt) >(grep “fail” >20140912_fail.txt) lets clean … Read More

multiboot script

so after a couple of posts about creating a multiboot flash drive, i created a script that should automate it a bit which is located here. as of time of writing: it formats the disk installs grub2 boots debian netinstall 32 & 64 boots fedora 32 & 64 boots gentoo 32 & 64 boots kali … Read More

response time script

after having to work with apache bench and gnuplot to put my numbers together and some furious searching, i decided to put together a script that eases ab & gnuplot a bit. that script is located here. it will give you graphs like this : Click to enlarge good stuffs.

bigghost name generator script

so i read Big Ghost’s site semi frequently since the reviews are actually pretty funny. One thing i noticed is that who ever does the writing can come up with these names that are hilarious. so i decided to write a quick script using some of the names from that site to pseudo-randomly generate names. … Read More

simple system stats script for graphite

so i wrote a little script for dumping some stats to a graphite server. script is located here. all you have to do to get this working: ensure nc is installed ensure vmstat is installed change gserver and gport to matching graphite server and port and cron this to run every minute or so. it … Read More

adding cron’s to crontab from a script

so i needed to add things to a couple of boxes without completely killing off the existing crontab from a script. i came up with this: TMP_FILE=$(mktemp –tmpdir cron.$$.XXXXXXXXXX) crontab -l > ${TMP_FILE} echo ‘# * * * * * script’ >> ${TMP_FILE} crontab ${TMP_FILE} rm -rf ${TMP_FILE} it will take a copy of the … Read More

magic 8 ball bash script

so i got bored a couple of days ago and decided to write a magic 8 ball script. i know, they have been done a million times before, but it was 10 minutes and i wanted to see how centered in the terminal i could get it. you can get it here. here are the … Read More

dreamhost dns updater from bash

so a couple of weeks ago i decided to write a dreamhost dns updater even though ttl is 4 hours. This script uses your dreamhost api key (assuming it has dns access), to either check, delete, list, or update your ip address for a given record in dreamhost. Makes dynamic dns possible with dreamhost except … Read More

rfc-reader from command line

so a couple of weeks ago i decided to write an rfc-reader that is usable from the command line. Here it is. you can search for a bcp, fyi, ien, std, and an rfc. then when you select one to read, a formatted term will pop up with it open. i know there are hundreds … Read More

zshrc and password generator

so i added two different password generator functions into my .zshrc. one for regular: function genpasswd() { if [ -z $1 ]; then echo “need a character count” else tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${1} | xargs fi } and one for strong: function genpasswd_strong() { if [ -z $1 ]; then ... Read More