A URL shortener service called Bit.ly launched today. It has some great features that convinced me to switch from using Metamark to shorten my URLs. Since I have a slick script that allows me to use the Metamark API from Quicksilver, I had to modify the code to make it work with Bit.ly.
Copy the following script, name it what you want, and save it in your home folder. When you want to shorten a URL in Safari, run the script from Quicksilver and it will put the shortened URL on your clipboard, ready for pasting.
#!/usr/bin/env python
usage = '''
Takes the URL of the frontmost Safari window/tab and
shortens using the service at bit.ly. The shortened
URL is put on the clipboard, ready for pasting.
'''
from urllib import urlopen, urlencode
from os import popen
# Get the URL of the frontmost Safari window/tab though AppleScript.
applescript = '''tell application "Safari"
URL of front document
end tell'''
url = popen("osascript -e '" + applescript + "'").read().strip()
# Get the shortened URL from bit.ly.
shortURL = urlopen('http://bit.ly/api?url=' + url).read()
# Put the shortened URL on the clipboard.
popen('pbcopy', 'w').write(shortURL)
If Firefox is your thing, modify the AppleScript tell to:
applescript = '''tell application "Firefox"
set myFirefox to properties of front window as list
get item 3 of myFirefox
end tell'''Update: I also use the following script as a Quicksilver trigger to expand shortened URLs and protect myself from surreptitious rickrolling. Just copy the shortened URL you want to expand (TinyURL, Bit.ly, etc.) and trigger the script.
tell application "Quicksilver" to show large type (do shell script "curl -Is `pbpaste` | grep Location | awk '{print $2}'")If you want to be notified the next time I post something, sign up for email alerts or subscribe to my RSS feed. Thanks for visiting!




(No Ratings Yet)How To Rescue Your Time And Get Your Life Back
June 1, 2008
7 Comments
A couple weeks ago I wrote about the time required to become an expert songwriter. That advice could have been just as well for any craft, not just songwriting. And the number of hours that I referenced, 5,000, was arbitrary. There is no magic number. But if you’re not an expert yet, you can be sure that there is a number and it’s probably higher and farther than you wish… assuming you wish you were an expert right now.
While I’m clearing things up, I used the word “expert.” The research supports the correlation between practice and expertise. Just saying.
If you “get” that spending lots of time practicing your craft is a good thing, then good for you. You’ll be happy with what I have to show you. If you don’t get it, then it can only be for three reasons that I can think of right now…
- You’re resistant to, or afraid of, committing to your craft. If so, that’s a valid feeling and you’re not alone.
- You’re lazy — unwilling to work or use energy — and have deluded yourself into believing that you don’t need to work at developing and mastering your chosen craft. This too is totally common and nothing to be ashamed of.
- You just don’t want to be told what to do. If this is the case, maybe the timing just isn’t right for you. Maybe you shouldn’t commit just yet. I’m sure you have your reasons.
If any of those points describe you, heck, even if they don’t, read The War of Art. Maybe that will inspire you to break through the blocks and win your inner creative battles.
Enough said. Moving on.
Rescue Time is a free application (Mac,Win,Linux) that has become very important to my weekly GTD review. It’s helping me put some metrics to my writing goals.
Rescue Time tracks your activity at your computer. If you’re working, it logs it. If you’re slacking off, it logs it.
It uses application, category, and tag based tracking. This means you can track how you’re spending your time by the application, the tag you give to your applications and websites you visit, and by category.
You really start to understand your computer habits fast when you see the results of your time in a pretty bar graph. It can feel intimate. This is your life you’re looking at!
Here’s an example. Logic Pro is my main compositional tool. Within Rescue Time’s interface, it’s listed under the Audio/Video Tools category. I’ve also tagged Logic Pro with the keywords, composing, audio, work, mixing, music, recording, and creative.
When I look at Rescue Time’s data, I can see how much time I’ve spent using Logic Pro, or how much time I’ve spent in the Audio/Video Tools category, or how much time I’ve spent composing.
When you see how much time you’ve spent at something relative to something else — like composing vs. surfing the internet — you really get much needed perspective on how your actions line up with your goals.
So I’ve set up a goal to compose at least one hour a day. Every time I reach my goal, that is, when I’ve used Logic Pro an hour or more, Rescue Time sends me an alert.
I’ve even set up some negative goals. I’d like to spend less than an hour on Twitter each day. (a goal I’ve met ever since I started it, knock on wood.) If I were to go over my alloted time, Rescue Time would either email me or text message me, depending on how I set it up.
As you can see, if you would like to reach an hourly songwriting goal, tag the applications that you use to write songs and set it up in Rescue Time. It’s simple.
Back to the expert practice advice.
To reach 5,000 logged hours of songwriting, starting now (June 2, 2008) at 10 hours a week, you’ll get there on Thursday, December 28, 2017.
Looks like I’d better get back to writing now.




(2 votes, average: 5 out of 5)GTD: Integrating Remind, iCal, GCal, Quicksilver
April 13, 2008
0 Comments
A Unix program called Remind is one of the greatest tools for keeping your goals and projects on track. Where calendars like iCal and Google Calendar come up short, Remind fills in the gaps.
For example, iCal alarms can remind you of an event minutes, hours, or days before it occurs, but it won’t count down to a goal with date-based math. Say you’re trying to lose 10 pounds by the first of June. No calendar application that I know of will tell you that you have 49 days to reach 170 pounds. This is where Remind rules.
Here’s how I have my system set up. Remind pulls all of my custom reminders from a few text files. It outputs them to my desktop using Geek Tool. I have a couple scripts that convert my iCal events to Remind format and Remind events to iCal. This way everything is synced up. I get Remind events in iCal and on my iPhone and I get iCal events on my desktop with Geek Tool. Using Spanning Sync, I can publish all of my iCal and Remind events to Google Calendar for sharing with family or colleagues. And if you don’t want to pay for Spanning Sync, you can publish your iCal to .Mac and then subscribe to it with Google Calendar. It’s not two-way syncing, but it works.
The final trick is to use Quicksilver to get reminders into Remind fast. For this, I have a simple Quicksilver action that appends my Remind text file.
I use Remind to help me finish songs, save money, remember birthdays, take the garbage out, and just about everything. Where it shines the most is in events that can benefit from date-based math, like I mentioned above. Everything you need to get started is on my wiki.





(2 votes, average: 4.5 out of 5)How To Use TextMate As NetNewsWire’s External Blog Editor
October 8, 2007
0 Comments
I used to be an Ecto user but I have since seen the light and call TextMate my be-all-end-all blogging tool. The only thing I missed was being able to use Ecto as my external blog editor while reading feeds in NetNewsWire. Not anymore!
Thanks to the Circle Six Blog for the superior coding kung fu.
In TextMate, show the bundle editor and create two new commands:
Name: Determine Script Location
Save: Nothing
Command(s):
#!/usr/bin/env ruby -rjcode -Ku
%x{ osascript "#{ENV['TM_BUNDLE_SUPPORT']}/lib/blogselection.scpt” }
Input: None
Output: Insert as Text
Activation: Key Equivalent: ⌃⌥⌘5
Scope Selector: text.html
Name: Insert Quote from NetNewsWire
Save: Nothing
Command(s):
#!/usr/bin/env ruby -rjcode -Ku
print %{Place the file "blogselection.scpt" in #{ENV['TM_BUNDLE_SUPPORT']}/lib/ }
Input: None
Output: Show as HTML
Activation: Key Equivalent: ⌃⌥⌘5
Scope Selector: text.html
Now create and save the following Applescript. Click here to open the script in Script Editor.
Execute the first command to determine the script location. That’s all for the setup.
Now, whenever you find something in NetNewsWire that you want to quote, tab over to TextMate, open a new blog post (HTML), and run the command (⌃⌥⌘5).




(2 votes, average: 5 out of 5)Logic Pro 8 Released!
September 16, 2007
0 Comments
Logic Studio was released on Wednesday and it was in my hands by noon. Unfortunately, due to my owning the academic version of Logic Pro 7, I had to wait until Friday to find a tricky hack to install the upgrade. There’s no upgrade for academic versions. I think it’s a stupid rule. I figure it should be like getting an educational discount on computers. Apple doesn’t see it that way. It’s probably the first time I’ve ever been mad at Apple.
But now that Logic Pro is installed in my system, all I can say is “Wow!” Logic Pro got a boob job. The user interface has been completely overhauled. That was my biggest complaint with Logic Pro 7. It wasn’t as fun to use as GarageBand. It didn’t have that Apple sexiness. Now it does.
Logic Studio is a set of apps including Logic Pro 8, MainStage (a live performance app), Soundtrack Pro, and all of the GarageBand Jam Packs. It’s a serious suite of sound tools. I haven’t even launched MainStage yet. And it’s an app I’ve been waiting for them to develop for a long time!
So you know what I’ll be up to for the next few weeks.
For a quick look at just one of the many sexy improvements, watch my Logic Pro 8 Template Chooser video. This will be part of a video training program I’m helping to develop at Logic Studio Training.
To talk well and eloquently is a very great art, but that an equally great one is to know the right moment to stop.
– Wolfgang Amadeus Mozart




(1 votes, average: 5 out of 5)