March 3rd, 2012
The Williamson County Regional Park has an abandoned rock quarry, and it looks like it is being used as a dump.
Here are some of the things that I found disposed there
- Spent shell casings
- Paint cans
- Various parts of sheds and houses
- Water heaters
- Glass bottles
- Tons of trash
And, here are some pictures
January 6th, 2012
I find it hilarious that google has to go to the extremes of purchasing elgoog.com. I understand why, but it is either sad or funny… or maybe both…
December 11th, 2011
The Bash test construct “[" is different then the extended test construct "[[", which might be obvious after the fact. It is usually better to go with the newer extended test construct over the plain test construct.
Things that work with the extended test construct:
- Parameter expansion
- Command substitution
- &&, ||, <, and >
- Arithmetic evaluation of octal and hexadecimal constants
Things that don't work:
- Filename expansion
- Word splitting
Here is an example of how "[" and "[[" differ
shrek@li118-154:~$ if [[ "a" > "b" ]] ; then echo "boo"; fi
shrek@li118-154:~$ if [[ "a" < "b" ]] ; then echo "boo"; fi
shrek@li118-154:~$ if [ "a" > "b" ] ; then echo "boo"; fi
shrek@li118-154:~$ if [ "a" < "b" ] ; then echo "boo"; fi
shrek@li118-154:~$ if [[ ls && ls ]] ; then echo "hi"; fi
shrek@li118-154:~$ if [ ls && ls ] ; then echo "hi"; fi
-bash: [: missing `]'
December 10th, 2011
I was digging around the frig and found this lovely lab experiment.
I chunked it after taking the picture…
December 9th, 2011
Named pipes in linux are pretty cool. Here is an example of how to create a named pipe to send stdout to the logger shell command, which sends it to syslog.
echo "stdout going where you expect"
# create the named pipe
mknod $npipe p
# fork the logger and have it listen on the named pipe
logger <$npipe -t iamapipe &
# link file descriptor 6 to stdout (save stdout for later)
# now replace stdout with the pipe we created
echo "Now stdout is being logged to syslog"
# put stdout back in place and close fd 6
exec 1>&6 6>&-
echo "stdout is back"
Here is the output that is sent to the console. Notice that the middle set of echos are not shown.
stdout going where you expect
stdout is back
Here is the output found in the /var/log/syslog.
shrek@li118-154:~$ sudo grep iamapipe /var/log/syslog
Dec 10 02:48:50 li118-154 iamapipe: Now stdout is being logged to syslog
Dec 10 02:48:50 li118-154 iamapipe: 1
Dec 10 02:48:50 li118-154 iamapipe: 2
Dec 10 02:48:50 li118-154 iamapipe: 3
Dec 10 02:48:50 li118-154 iamapipe: Done
I am now the pipe master…
December 7th, 2011
For development purposes, I have installed MongoDB on my laptop. Here is my launch script. It is called com.mongodb.mongod.plist and it is placed in ~/Library/LaunchAgents/. It starts up a single instance of mongod that I installed using brew.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
I also added this to my .bashrc / .zshrc to easily start and stop mongod.
alias mongodb_start="launchctl load ~/Library/LaunchAgents/com.mongodb.mongod.plist"
alias mongodb_stop="launchctl unload ~/Library/LaunchAgents/com.mongodb.mongod.plist"
December 6th, 2011
My new Canon EOS D60 came in the mail yesterday. I am happy with it so far. Here are some of the quick pictures I took around the house.
December 3rd, 2011
I presented at JavaOne 2011, and it was a interesting experience. It was my first time in San Francisco, and my first time presenting at a conference. I thought it went ok, and the two people that gave me reviews that averaged out to a 4 out of 5. Next time I will be more prepared for what to expect.
Here is the slideshare for the presentation:
December 2nd, 2011
So, sometimes I receive random E-Mails from people looking for somebody else with my name. Yesterday, I received an E-Mail from an unnamed major realtor in Australia. They sent me a bunch of documents to sign and send back. This is a little bit funny because I do not live in Australia, do not have any dealings in Australia, and never been to Australia. It was time for a bit of fun.
Here is the original E-Mail:
Here is my response:
Finally, here is the realtor’s response:
Wait…What…I am confused… Is it such a normal thing to slaughter goats in your apartment in Australia?
Note: I do not slaughter animals.