Archive | Tech
Getting Cygwin and Java to play together
I hate it when Open Source projects can’t handle the fact that I run everything in Cygwin. Yes, I still want to use your run.sh file and have it understand my Java interpreter. Yes, classpath and everything! It’s not hard people!
Luckily, I keep this script handy, which I stole from ANT years ago:
case "`uname`" in CYGWIN*) cygwin=true ;; esac # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --windows "$JAVA_HOME"` CLASSPATH=`cygpath --windows --path "$CLASSPATH"` fi
Gettin’ Funky With GreaseMonkey
I recently re-discovered Greasemonkey, a Firefox powered, client-side JavaScript library that lets you change the pages your way. The Greasemonkey Homepage explains it better:
Greasemonkey is a Firefox extension that allows you to customize the way webpages look and function.
I’ve used it before, but haven’t touched it for quite some time. But I had an itch I decided to finally scratch . . .
For reasons too complicated to explain here, I use SquirrelMail to read my email for hostetlerhome.com. The interface annoys me and my web hosts provider’s implementation is horribly slow at times. Bored one day, I started looking for ways to tweak it and I found some shortcut keys in a Greasemonkey script. And then I found a good image viewer for SquirrelMail. And then this one that displays the unread message count in the title. Jeepers — almost like GMail with Better GMail!
Then I started looking at other solutions for web annoyances. I don’t go near as often as I used to, but I still like Geocaching but their site is fully of click-click-click when it could be much more streamlined. I found GC Tour script, and it’s better than I could have ever hoped! You can keep your cache lists inside of GC Tours, download GPX files of them and the whole bit. A must-have for geocachers.
Now I decided to roll my own. I’d done this a couple of years ago, but I needed to refresh my memory. And I definitely had a need — on an application I develop at work, we have to interface with another application. We always test with a lot of the same data (because we know what to expect from it in dev and test) so we always enter it over and over again. It never changes between tests. So I wrote a quick Greasemonkey script to populate the data when I go to the page. Took me an hour, but saves me tons of time. The HTML was horrid, but I included JQuery in the script and that took care of most of the mess.
So, yet your funk on and explore (or re-explore) the wonderful world of Greasemonkey. I’d start at UserScripts.org
Setting Proxy Environment in UNIX
The easiest and best way to set proxy information on your Linux/Unix machine is with the http_proxy environment variable in your ~/.bashrc, ~/.zshrc, or whatever your favorite shell’s configuration file is. Set it like this:
http://user:password@proxy-server:portnum
In my brief bit of experimentation, the follow important (to me, at least) command-line tools use http_proxy:
- wget
- Python easy_install
- curl
I’ve been a Unix user for 14 years — why did I take me so long to figure this out?
A new look
I’ve neglected the style of this blog for waaay too long. I was using the “default” blue theme, but since like WP 2.3. Since then they have introduced Widgets, which are very useful things and I have used them in other people’s blog, but never took advantage of it myself. And I have been looking at other themes and recommending them to people, but not using them myself. So I said “Enough!” and decided to take care it all this myself.
The Google Search field, the Adsense and my cool little Amazon Thingy are powered with Widgets. The theme is called Frugal and this is the free version of it. Some of you may think that it’s a little boring, but I think it’s beautiful in it’s simplicity. The content is what is the focal point in this theme and that’s what I want my blog to be about — content.
Anyway, I will be updating other things here from time to time. Some things like the About Me and the Links are horribly dated.
Magic Space in ZSH
Since writing this post about bash, I’ve switched to zsh. A lot of the functionality is there, plus quite a bit more. But zsh doesn’t use GNU Readline, so you can’t add anything to inputrc. But you can put something in your ~./zshrc:
bindkey ' ' magic-space # also do history expansion on space
