2009
12.28
so i started taking pictures and realized that when i dumped all the pics off my cf card that it would just dump all the pics into one folder. so using exif (in gentoo “emerge media-gfx/exif”, from source: http://libexif.sourceforge.net/) i came up with a quick snippet using exif to move the pictures to the proper dated folder (dated according to when the pic was taken not dumped off card):
for X in *;
do Y=`exif $X |grep origi |cut -d"|" -f2 |awk '{print $1}' |sed 's/:/_/g'`;
cp $X $Y;
done
just replace “cp $X $Y” accordingly. for me $Y is “~/pics/$Y”
2009
11.23
so i decided to have my wallpaper in evilwm switch up every 60 seconds but since setting the wallpaper in evilwm requires the usage of feh, xv or some other utility i came up with this little script below which gets daemonized by .xinitrc at login:
#!/bin/bash
while :;do
files=(/path/to/*.jpg /path/to/*.jpeg /path/to/*.png /path/to/*.gif)
N=${#files[@]}
((N=RANDOM%N))
randomfile=${files[$N]}
#/usr/bin/xv -quit -root -rmode 5 $randomfile
#/usr/bin/feh --bg-center $randomfile
sleep 60
done
only things you have to change are the “path to’s” and you have to uncomment either the xv line, feh line or substitute your own.
you can also change the sleep interval if you want to make it shorter or longer.
2009
11.20
here is a quick and dirty little script to see how many open files tomcat is using up.
#!/bin/bash
USER=tomcat
LSOF=`lsof -u $USER | wc -l`
OPEN_F=`ulimit -a | egrep "open files" | awk '{print $4}'`
#PERCDONE=$(( $LSOF / $OPENF * 100 ))
PERCDONE_PRE=$(echo "scale=2;(($LSOF/$OPEN_F) * 100)" |bc)
PERCDONE=`echo $PERCDONE_PRE | cut -d. -f1`
if [ $PERCDONE -lt 84 ]; then
printf "OK -- $PERCDONE %% with $LSOF files open\n"
exit 0
else
if [ $PERCDONE -ge 85 ] && [ $PERCDONE -le 94 ]; then
printf "WARN -- $PERCDONE %% with $LSOF files open\n"
exit 1
elif [ $PERCDONE -ge 95 ]; then
printf "CRIT -- $PERCDONE %% with $LSOF files open\n"
exit 2
fi
fi
2009
11.16
my setup at night (click for a bigger image):

2009
10.28
the scottish crew gave me a cool new gift:

this bad boy should be getting added to the cavalcade of machines in use.
2009
10.27
this is a real simple way to redirect all hotlinked images to another image in apache from either the httpd.conf or an htaccess file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?insert_url_here\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(png|gif|bmp|jpg)$ image_here.jpeg [L]
format is real simple, you just have to change insert_url_here\.com to your url so that any request coming to your server will be redirected to the image in the last line RewriteRule .*\.(png|gif|bmp|jpg)$ image_here.jpeg [L]
make sure to change image_here.jpeg to the path and image that you want to use.
2009
10.23
hello all,
as some of you may noticed that the format and layout has changed.
i am in the process of changing from simplephp blog to wordpress since simplephp is no longer being maintained.
all the old posts are going to be brought over to this new layout bit by bit but for now are located at http://www.pissedoffadmins.com/old/
things should be back to normal within a couple of days.
2009
10.20
to the one or two of you that read this slop every now and then i apologize for no recent updates.
i have been working on migrating all the content on this site to wordpress since this particular software is no longer being maintained.
look forward to more updates soon.
2009
07.22
here is my .conkyrc as used for:

used in this desktop screenshot:

along with:
evilwm, mrxvt, xsetroot, xv (for wallpaper) & xclock