Getting Cygwin and Java to play together

Sep 1st, 2009No Comments

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

Aug 31st, 2009No Comments

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

My Prayer for My Blueberry Girl

Aug 11th, 2009No Comments

Ladies of Darkness,
Ladies of Light,
and Ladies of Never-You-Mind,
This is a prayer for a blueberry girl.

I decided that it was time that Leah got her first Neil Gaimen book. Instead of getting some of my favorites like American Gods, Neverwhere, or even The Graveyard Book, I opted for Blueberry Girl.  OK, actually I was looking for something special for Leah before she started kindergarten this fall and found out about this book and,  yes, it is perfect for my Spiderman-loving, bike ridin’, science experimentin’ daughter.

I want her to be safe, but also to experience life as she makes a big step into the world.  I think this book explains all that.

How to stop zshell from dumping

Jun 12th, 2009No Comments

I fixed this once couple years ago, with more than a little guidance from the ZSH-Users list.  But it started happening to me again a few weeks ago and I couldn’t remember how I fixed it. After searching through my GMail this morning, I found it.  Maybe if I put it here I will remember how to fix it next time.  And maybe help someone else.

This only happens to me when I use zsh  via Cygwin (I also use zsh on OSX and Linux).  What happens is that when zsh hits compinit in my ~/.zshrc, it prints a ton of the built-in functions to standard error and that’s it.  No error, no complaints . . . and no completion.  None at all!  See this article for a decent idea on how wonderful zsh does completion.

The fix is easy — manually remove ~/.zcompdump and manually run compinit. That instance of compinit will complete fine.  Then start a new shell and you are good to go!  Note that you have to manually run compinit – just starting a new shell won’t fix it.

I’m not sure why my ~/.zcompdump keeps getting corrupted . . . maybe because my home directory is on a shared drive?

Setting Proxy Environment in UNIX

Jun 8th, 2009No Comments

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:

  1. wget
  2. Python easy_install
  3. curl

I’ve been a Unix user for 14 years — why did I take me so long to figure this out?

Page 5 of 121« First...«34567»102030...Last »