Tag: ugly
IPv6 Day Silliness :)
by Nick on Jun.03, 2011, under Administration, Frivolous, News
Well, in honor of IPv6 day, I decided to spurn people along. I created an IPv6 validation badge of my own, and a few other things to prod people to get their providers to switch.
I’ve also updated http://ipv6.chronophage.net with a new look. It also shows you a video that warns you of the real and present dangers of not switching to IPv6, or celebrates your IPv6 achievement with an INTERNET classic ![]()
Making the pages was fun, especially using php to spit out the various dynamic graphics. In one spot I use a validator lifted from here On the main page i simply have this SetEnvIfNoCase REMOTE_ADDR "^[0-9a-f:]+$" IPV6_USER=1 in my apache config, and check for that variable in my shtml index. I use a php filter elsewhere. This is to test various ways of IPv6 validation. If you see an error, please comment.
Making dynamic graphics was straight out of the php documentation. That language has a function for everything!
No one will accuse me of being a website designer, I hope it’s ugly enough for you.
Anyways, have fun! Happy (pending) IPv6 day!
Don’t buy a Gateway Notebook!
by Nick on Jul.28, 2009, under Hardware, News
I bought a gaming laptop. I bought it thinking that I could do a lot with the nice, powerful chip that came with it. My first disappointment was the horribly outdated NVIDIA drivers that came with the laptop. I could not play WoW, at all. I found this odd for a gaming laptop. I could forgive them for giving me 4gigs of Ram, but a 32-bit operating system. My second is this, I cannot enable VT extensions on my CPU, even though it clearly supports it. I need to be able to run VMWare and/or VirtualPC for various work projects. This is highly disappointing. Ultimately, my prime gaming laptop may end up collecting dust in the closet, a constant reminder of why no one should buy Gateway.
What happens when I program “On the Fly”
by Nick on Jun.11, 2009, under News, Software
So I needed a quick script to query a billing database for DSL users. The user names, of course where horribly inconsistent. I had to use a program that executed a query of the database, as I didn’t have access to the actual database. Oh, and I didn’t know any Perl at the time.
Now, I have a bad habit when writing code for myself, to use ambiguous variable names, and strange loop structures, and no comments. See if you can figure out what’s going on.
Oh, I vow never to write code like this again. ![]()
#!/bin/bash
echo Audit run on $( date )
echo Audit run on $( date ) > notinbilldb.txt
echo
echo
for i in $( cat radiusdump.txt | awk '{print $1}' ); do
t2=""
t2=$( echo $i | sed -e 's/\@.*$//;' | cut -f1 -d . )
t1=$( billdb -s $t2 | grep DSL | awk '{print $3}' | sed -e 's/\.dsl//; s/^dsl//;s/\@.*$//;' )
t3="0"
t4="0"
t5="0"
t6=""
if [ "$t1" = "" ]; then
t1=$( billdb -s $i | grep Email | awk '{print $3}' | sed -e 's/\@.*$//;' )
t5="1"
fi
if [ "$t1" = "" ]; then
echo $i is not in billdb.
echo $i is not in billdb. >> notinbilldb.txt
t4="1"
fi
p=$( echo $i | sed -e 's/\.dsl//; s/^dsl//;s/\@.*$//;' )
k=""
for k in $( echo $t1 ); do
if [ "$p" = "$k" ]; then
if [ "$t5" = "1" ]; then
t6=", but only in email"
fi
echo $i matched $k in billdb$t6.
t3="1"
fi
done
if [ "$t4" = "$t3" ]; then
echo $i is really not in billdb but was close to $t1.
echo $i is really not in billdb but was close to $t1. >> notinbilldb.txt
fi
echo --------------------------------
echo
done
echo
echo Audit completed $( date )
echo
