Archive for the ‘Programming’ Category

Kill currently playing track in iTunes

Sunday, April 29th, 2007

If you are anything like me you have probably amassed an iTunes library that would take a nice holiday to wade through. With your iTunes on shuffle you might even run into some tracks you downloaded eons ago, after reading rave reviews on some weird blog, that on second thought sound pretty damn lame. I have always been bothered with iTunes’s lack of a quick way to ‘kill’ tracks. When you are in your library and the track you are listening to is selected you need to hit a key combo and click an ok button just to get rid of it. And when listening to a playlist the delete option is completely missing. So i set out to fix that.

What i came up with is a simple applescript that you can assign to a keyboard shortcut so killing that track is always just a keystroke away. Think that’s neat? Please follow along…

step 1

Download and unzip the Kill Track Applescript file.

step 2

Enable the script menu with the Applescript utility located in the Applescript folder in the Applications folder.

step 3

Copy the script to your ~/Library/iTunes/Scripts folder. (create the Scripts folder if it does not yet exist).

step 4

Open System Preferences and go to the Keyboard & Mouse preferences panel. Go to the Keyboard Shortcuts tab and add the Kill Track menu option for iTunes and pick a shortcut.

KillTrack.jpg

step 5

That’s it! The next time you’ll open iTunes you’ll see the little scripting menu icon in the top and it’ll have the Kill Track option there together with the keyboard shortcut. Next time you feel like hatin’ a track; hit the shortcut and kill it. I promise you’ll feel better afterwards.

The script automatically removes the track from your library and removes the file from disk.

KillTrack2.png

Disclaimer: this script comes with no warranty whatsoever, use at your own risk. Your computer might turn green and go poof if you use it.

Like Magic

Saturday, April 21st, 2007

Then someone made a joke: why doesn’t Dabble pick colors automatically when customers upload a logo? Discussing it further, we decided we weren’t joking. Our graphic designer Luke was somewhat doubtful, but we thought it would be a cool feature, so we dove in.

The boys at Dabble figured out how to build an automatic color scheme based on an uploaded company logo. Pretty damn neat.

Quicksilver Plugin for Jaiku (using Plazes)

Wednesday, March 14th, 2007

Today i finished the Jaiku Quicksilver plugin i have been using for a while but never got ready for general distribution. The script works in mysterious ways, or better put; it uses not only Quicksilver but also Plazes to do an update so you don’t have to set the location by hand and can simply type a message and be done with it. This of course comes with a price; you will have to have the Plazes plazer installed to actually use the script. This makes the potential group of users rather small but there are bound to be at least four people out there who find this useful ;)

Install guide!

  1. Download the Applescript file
  2. Make a folder called Actions in the folder ~/Library/Application Support/Quicksilver
  3. Copy the Jaiku Applescript into the Actions folder
  4. Restart Quicksilver (sometimes it is hard to get it to refresh)
  5. Add your plazes username and password to the keychain using the name http://beta.plazes.com (if it’s not already in there)
  6. Add your jaiku username and personal key (as the password) to the keychain using the name http://api.jaiku.com (you can get your personal key here). Use the application called Keychain Access for this and the previous step.
  7. You’ll have to click yes a bunch to allow the keychain to be used

There is a plazeless version too, follow the same steps as above only leave out the ones where it invloves Plazes.

User guide!

  1. Open Quicksilver (command-space)
  2. Hit . (period) to open text mode
  3. Type your message
  4. Hit tab
  5. Start typing Jaiku
  6. When you see Jaiku appear as the action, hit enter
  7. Go check you Jaiku stream to see if it worked!

Version history

  • v0.1, 14-3-2007, initial release
  • v0.2, 14-3-2007, removed default icon since it can’t be changed yet anyway

Roadmap

  • Icon selection
  • Maybe get Plazes data from feed (no need for a password)
  • Maybe release a plazeless and/or a standalone version (if anyone needs it)

p.s.
The script is ‘run only’ for now since not all of the stuff it uses is public yet. Full code should be available soon so you can go build your own versions. changed files to full source, adapt and multiply!

SVN and CakePHP

Sunday, March 11th, 2007

If, like me, you often use Subversion as your versioning system and CakePHP as your framework you will probably need to setup up your subversion repository to ignore certain files on your development machine before checking them in to the repository. Obvious candidates for exclusion are your config files and your cache. Although there is lots of info on the web about this sort of thing there are so many ways to do this it’s nice to have a Cake specific example.

to exclude your config files simply do:

svn propset svn:ignore core.php app/config/
svn propset svn:ignore database.php app/config/

rinse and repeat if you have more server specific configuration.

finally to exclude your cache files do:

svn propset -R svn:ignore "*" app/tmp/

this will recursively set an “ignore all files” property on all the directories in tmp.

happy baking!

New PHP bundle in latest textmate

Tuesday, March 6th, 2007

[NEW] PHP bundle: Option-escape will provide completion candidates for the current (partially typed) function name and option-F1 will show a tool-tip with short documentation and call syntax for the current function (press ctrl-H to go to the manual page). All standard functions have been added to the normal completion on escape, allowing you to cycle through them. (Ciarán Walsh)

from the latest Textmate release notes (2007-03-04: REVISION 1368). thank you Ciarán!

A CSS Query Engine For Dojo

Monday, February 5th, 2007

Alex has spent some time on building a query engine for Dojo based on DomQuery (not jQuery) with a similar approach to, but fundamentally different from DomQuery, and the results are certainly very promising. It’s not as full featured as jQuery, yet, but it kicks ass performance wise. Great stuff!

Ever since we began the Dojo project, it’s been our intention to collect the very best, most useful JavaScript and consolidate it into a single library that makes your applications better and easier to use. I’m excited to announce a new evolution in Dojo that continues this tradition: dojo.query

dojo.foo » dojo.query: A CSS Query Engine For Dojo

Plat_Forms?

Tuesday, January 30th, 2007

The goal is to compare tools, but there will be no overall winner?. Why do they feel the need to keep stating that their testing method is scientififc (oj!). Why did the Ruby, Python and .net teams not qualify, what were the guidelines?

Neither Python nor Ruby nor, surprisingly, .net had a sufficient number of sufficiently qualified applications.

Why was that surprising only for the .net entry? And more questions from the organisers;

Why was Perl initially not in the list of platforms?

This was a mistake by Lutz Prechelt. He was simply not aware of the recent developments in the Perl web frameworks and erroneously believed that too little professional web development was being done in Perl.

Strange how a competition that is supposed to enlighten seems shrouded in questions…

Ancient History

Saturday, December 9th, 2006

Since i moved this blog to wordpress somewhere in 2003 i never had gotten around to adding titles to all the old posts so one could actually click on them in wordpress. Thus this wealth of ancient history has been lost to all for quite some time, horrible! Today i installed a little plugin that lists each and ever post by month and year which was a good excuse to write a little script that cleaned up all the old posts and add titles and post-slugs, behold; Ancient History. Beware though, the page might take a while to load. Eat that Google ;)

Ruby + cURL + Jaiku = pretty neat

Friday, November 24th, 2006

jaiku.png

The S stands for Simple

Friday, November 17th, 2006

SOAP? The S stands for Simple, Duh!