Over the last year or so, I’ve taken to heart the mindset of automating frequent / mundane tasks. Yesterday, I realized I was constantly annoyed at dealing with my development environment when I switch locations/ IP addresses. I’m working on a project that uses Informix, which doesn’t bind to the network in such a way that “localhost” will reliably resolve to the db server. So, I have to use the actual IP address. Since that changes frequently (I have three different offices), I find myself doing the following dance often:
- open command prompt: type ‘win+r’ -> type ‘cmd’
- run ipconfig
- select and copy the value
- paste into editor.
How annoying (soft links would be nice. boo, windows). So, yesterday, I decided it was time to end that and went out looking for an application that puts the IP address in the clipboard. I found a few, but only one of them did that headless, so I could script it… and that one didn’t work. Boo. So, I wrote the dozen or so lines of Java code required to do that, bundled up an executable jar and assigned it a key in WinKey. Now my process is “win+ctrl+A -> ctrl+v”. That’s better. Much less painful. I was going to assign a script macro in Texter to do it automagically, but there is no way to tell Texter to pause after running one keystroke and the Java app needs time to run, so the ctrl+v to paste the IP address could be run before the data is in the clipboard. Oh, well… it’s definitely good enough as-is.
While I’m blabbing, here are some other things I’ve “life hacked” in the last year….
- Installed Texter and setup about two dozen shortcuts. Things like “addy” for my address, “email” for my email (I actually have one for all email addresses), “sigline” to drop in my signature line when not in GMail, and so on. According to Texter, I’ve expanded 4,642 snippets, saving 87,357 characters which saved myself 3.64 hours (assuming 400 chars/minute). Neat-o.
- Installed WinKey. Now I can start apps without grabbing a mouse. Mmmm, not grabbing a mouse. I set it up so that “win+shift+CHAR” brings up a folder (ex: “win+shift+d” opens up my Development folder), “win+ctrl+CHAR” starts an application, and “win+CHAR” starts an environment like cygwin or the command prompt with Informix paths setup.
- Built an ANT script that does the tedious export/import of an Informix database from a remote server to my local server. Now I just run ONE task and get all the new stuff and can work on something else while it runs (it takes 30+ minutes to run completely). This was a huge time saver.
- Built several greasemonkey (and IE7 Pro) scripts for making web apps easier. This is really a HUGE life-hacking help for me. Even things just as simple as removing one click in a process seems like it’s been so much more helpful – even if it’s not saving a ton of time, saving me from going “grrrr, why did I have to click the button after picking the element from the select list?” makes me more productive (not-raging = more productive!). I’m to the point now where any annoyance in a website, I go reaching for my JS editor to write a script.
- Built a process for invoicing from FreshBooks that builds the report/timesheets and adds a signature to the PDF. This has saved me from opening several files and editing a bunch of data. It used to be about a 20 minute process and is now a few seconds.
- My BlackBerry development ANT task is a huge time saver also. It’s nothing special, but I’m happy that it gives me “one-click deployment” for that environment.
As always, I’m glad to share any of the scripts, apps or tools I’ve written, just let me know if you want ‘em.