Wishful Coding

Didn't you ever wish your
computer understood you?

Restore the old iTunes icon

Since the last keynote, where Apple announced iTunes 10, I've heard a lot of complaints about the vertical close buttons and the new icons.

For the close buttons you should keep an eye on http://hints.macworld.com/, but at least I solved the problem of the ugly icon.

Before updating, save the old icon by right-clicking on iTunes, and then on "Show package contents", then browse to Content/Resources and copy iTunes.icns somewhere safe.

Now upgrade iTunes, and do the same thing in reverse, so you'll overwrite the new iTunes.icns. Below is a video and the original icon, in case you are to late to copy it yourself. You might need to start and stop iTunes a few times, or even reboot to se the "new" icon.

[[posterous-content:xcKOWzC5uTfI2Lgl3rky]]

[[posterous-content:nGbvjkjyCfDKW1Svw1lV]]

[update] Posterous doesn't like my icon. Download it from Dropbox instead: http://dl.dropbox.com/u/10094764/iTunes.icns

Also, about the control buttons: defaults write com.apple.iTunes full-window -1

http://hints.macworld.com/article.php?story=20100901223846748

A smile for web standards

We all love web standards. While I was implementing a little easter egg(which are also very lovable) on http://coverontwerp.nl/ with a good deal of CSS3 love, I thought it would be nice to turn as many clicks as possible into a smile for web standards, a mini ACID test if you will.

Bellow you'll find a CSS snippet that, when included on your site, will flash a smile for every link clicked in a supporting browser.  It is totally unobtrusive, and only blinks the moment anyone clicks a link, thus spreading some positive feelings to all supporters of web standards.

Example implementations can be found here and on http://coverontwerp.nl/. Show some standards love, by including the snippet below on your site!

a:active:after {
	display: inline-block;
	margin-left: 5px;
	font-weight: bold;
	content: ":)";
	-webkit-transform: rotate(90deg); 
	-moz-transform: rotate(90deg);
	-o-transform: rotate(90deg);
}

Other selectors, styling and ASCII arts are encouraged!

Search Google in running browser

After reading this hint, I wanted to get it working with my previous script to open links in the currently running browser.

I did not use OnMyCommand, but instead just made an Automator service. Here is how:

  • Open Automator and create a service
  • Set the type to text
  • Add the ‘Run shell script’ action
  • Set the shell to Python and the input to ‘as arguments’
  • Paste the script below

The script(this text serves only to satisfy Posterous’s parsing engine, which is seriously pissing me off):

import sys
import urllib
import webbrowser
webbrowser.open("http://www.google.nl/search?q=" + urllib.quote(sys.argv[1]))

Automator

You need to have my previous script installed to do the actual opening of the url. With some more trickery, it is even possible to add this service as a keyboard shortcut. I suggest you Google around a bit, and comment if you find something revolutionary.