A quick usage note regarding the date util under bash. I sometimes want to convert between a unix timestamp and a formatted date string. I do it infrequently enough that I forget the syntax. This article is me writing down my notes.
In the following example, I want to get timestamps and date strings for both [...]
I’ve been working quite a bit with the rest plugin for Struts2. The really nice thing about this plugin is the way it cleans up Struts URLs. Makes them more rails-like. I chuckled when depressed programmer suggested that struts2 is “WebWork on drugs.” I hate struts2. I really do.
Anyway, I have stripped down an AccountController [...]
I have a remote machine that is used to store and process XML files. Recently, I had need to duplicate a directory of XML files (e.g., cp -r a b). It’s not really germane to the subject here, but this particular server has a whack configuration and I gotta rant before I continue.
The office server [...]
I needed to look up the various strings Apple uses to name the iTunes Library. First I tried to get name from the iTunes resource bundle
echo “this won’t work…”
echo “so don’t even try it”
cd /Applications/iTunes.app/Contents/Resources/English.lproj
cat Localizable.strings | grep ‘PrimaryPlaylistName’
But I quickly learned that grep doesn’t work on the strings file. Why? Because Apple string files [...]
Just about the time I believe the UTF-8 beast is in the cage, it escapes and runs amok.
This AM, I started to deploy an update to the webapp on EC2. Seems that some of the static strings in the app contained UTF-8 encoded non-ascii characters. The java compiler barfed. “The heck?”, I thought. I [...]
I wanted to complement my bash directory crawler post with a bash array crawler example.
Sometimes, it’s easier to jack a list of identifying tokens into an array and process them rather than to build an end-to-end script with database access. For this contrived example, I grab a list of UUID from MySQL with a simple [...]