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
so i have forgotten over the years how to add color to text in my terminal. so i wrote this script to show me some color combinations. here is what the output looks like: click image to enlarge
i just added this quick little function just to give me a quick output when attaching to emails: function checksum() { printf “FILE: `echo ${1}`\n” ; printf “SIZE: `ls -al ${1} | awk ‘{ print $5 }’` bytes\n” ; printf “MD5 : `md5sum ${1} | awk ‘{ print $1 }’ | tr ‘[:lower:]’ ‘[:upper:]’`\n” ; … Read More
i sit in multiple terminal sessions all day on my personal and work machine with my headphones on listening to pianobar (cli client for pandora : get it here or in gentoo emerge pianobar) and i realized that it was becoming a pain to send controls to the pipe for pianobar. so i wrote a … Read More
so on the command line, i have been looking for a brain dead simple way of syncing my photographs to s3 every x amount of hours. i wrote a small script to handle that and can be placed in cron to automatically copy new folders to s3. i am working on making this script also … Read More
so this script uses bwm-ng (gentoo : gentoo: emerge bwm-ng, or http://www.gropp.org/?id=projects&sub=bwm-ng) and netcat. pretty straight forward : #!/bin/bash ####### # this script uses bwm-ng to gather the bandwidth rx/tx and packet rx/tx on specified interfaces # it only sends numeric values # # to run this script : # nohup sh ~/scripts/bandwidth_graphite.sh & >/dev/null … Read More
so after some more work trying to ensure that my passwords are not easily gotten, i managed to get my passwords encrypted into one file and removed after being read. here is the snippet from my .muttrc-accounts : set my_tmp=`gpg -q –no-verbose -o /tmp/.passwords.tmp -d ~/.passwords.gpg` set my_pass_acct1=`cat /tmp/.passwords.tmp | grep IDENTIFIER1 | awk ‘{ … Read More
exactly as the name says. if you are a citrusleaf user, here is an easy (and hacky) way to output your namespace values to graphite with a nohup script every 10 seconds in github or here: #!/bin/bash ####### # this script runs through clinfo and grabs all the values for citrusleaf, then parses them out … Read More
at time of writing, gentoo TuxOnIce is at sys-kernel/tuxonice-sources-3.0.26 and gentoo sources is at sys-kernel/gentoo-sources-3.3.1. so after compiling tuxonice-sources (here is my .config for reference) and configuring all the hibernate / suspend scripts referenced here i realized that after resuming from either suspend to ram or hibernating to swap that my function keys were borked. … Read More
so i realized that with the setup i have that i did not have a detailed battery indicator on my thinkpad except for the battery light, so i decided to use acpi (gentoo: sys-power/acpi, or sourceforge). by just typing acpi (with the laptop unplugged) you get : Battery 0: Discharging, 99%, 02:58:51 remaining while plugged … Read More