RSS

Controlling iTunes remotely

3 Comments | This entry was posted on Jun 16 2009

So I just got this shiny new MacBook Pro. Absolutely love the thing. I’ve been away from the Macintosh platform for far too long…

Anyway – I’m sitting in my office listening to music and realized that the speakers, while okay for what they are, suck by most standards. So I pop over to my PC and fire up iTunes, hit play, and use my sound system that’s hooked up to it. Sounds great. But, I’m lazy and I got tired of switching over to it change tracks, stop, pause, etc. I figured there had to be a way to control iTunes remotely from the Mac. Doing a bit of research, I found some stuff for the Mac and a PHP script that did me no good.

Finally I came across a Perl script (can’t remember where…) that simply runs a Daemon. Everything that I needed was already there! All I needed to do, was point a browser at the box and it had a nice simple stripped down interface for play, pause, stop, next, etc…

After some time, I realized I hated having to keep the browser window open. Enter MacOS dashboard widgets.

After some quick fiddling with Dashcode, I came up with this little dashboard widget to send the requests to the PC. The current track name only updates after a command is sent, so it isn’t updated dynamically.

dash-widget2

Now my iTunes controls are at my fingertips, and I don’t have to spend the time moving my hands the whole 24 some inches to the right to do it on the PC.

gZip your JavaScript

0 Comments | This entry was posted on Mar 17 2009

Most browsers these days (with the exception of Safari, I think?) will accept gzip encoded content. This means you can drastically reduce the size of all those bloated javascript libraries you might be using on your web site.

So how do you serve gzipped js files?

There a few methods out there. I chose the one below since it was fast, easy and I’m hella freakin’ lazy.

The first step is to gzip all of the javascript files that you might be serving up. The fastest way I found was to just telnet into the server, and execute the following bash command:

gzip -cr <javascript directory>

Of course you’ll need to replace <javascript directory> with the correct directory that your javascript files are located in. The -c option tells gzip to keep the originals. This is important so that you can still serve non gzipped versions to browsers that don’t handle gzip! The -r option tells it to recurse through the directory. Now you should have a directory full of javascript files and their gzipped counterparts.

init.js
init.js.gz
jquery-ui.js
jquery-ui.js.gz
jquery.easing.js
jquery.easing.js.gz
jquery.history.js
jquery.history.js.gz
jquery.js
jquery.js.gz
swfobject.js
swfobject.js.gz

Yay. How exiciting, no?

The next step is to modify .htaccess to do some URL rewriting.

AddEncoding gzip .gz
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)$ $1.gz [QSA,L]

Essentially your telling the web server to server up gzip files, if the browser accepts them and the user is not on Safari and if there is a compressed version of the file available.

That’s really about it.

Here’s the difference in file sizes:

File Size Size (gZip)
init.js 7628 1992
jquery-ui.js 127787 50756
jquery.easing.js 8097 2003
jquery.history.js 5079 1771
jquery.js 31033 15666
swfobject.js 6722 2233

Pretty significant size difference!

Force directed node interface 2

0 Comments | This entry was posted on Feb 17 2009

Here’s an example of the force directed node interface that I’ve been talking about. It’s not complete. It’s just a working prototype. You still cannot load project details, but I’m waiting to add that if I decide I want to take this any further.

Since the dimensions of the interface have been reduced to fit in this blog post, things might be a bit small (try zooming in). You can also drag nodes around. Helpful when things get pushed off the screen. Nodes can be opened and closed by clicking on them.

Get Adobe Flash player

WordPress for iPhone

0 Comments | This entry was posted on Nov 23 2008

Just testing WordPress for iPhone…

Microsoft Surface Parody

0 Comments | This entry was posted on Sep 25 2007

One day, your computer will be a big-ass table…

Web-based software license compliance tool

0 Comments | This entry was posted on Sep 15 2007

The Business Software Alliance is offering up to $1 million to whistle blowers who report software piracy and organizations are paying record fines for noncompliance. From initial fines to further audits from individual vendors, being found in noncompliance can be costly. So what help is there out there?

Centennial License Manager is a web-based software license compliance solution that helps you quickly reconcile license entitlement to software usage on your network. Not only can it help your licensing position, it can help you save money as well by showing instances where you may be over licensed.

For more details, visit the License Manager products page at Centennial Software.

Driver’s License as Ableton Live MIDI Controller

0 Comments | This entry was posted on Jul 09 2007

BotVoice.A – Your system files have been deleted. Sorry.

0 Comments | This entry was posted on Jul 05 2007

Panda Labs has detected a new trojan named BotVoice.A Trojan. Users who get infected will hear the phrase, “You have been infected. I repeat, you have been infected and your system files have been deleted. Sorry. Have a nice day and bye bye.”

The virus deletes systems files, modifies the registry to block attempts to undo the damage and takes control of Windows text reader. It is spread through peer-to-peer networks, external storage devices and malicious Web sites.

You can read more about the virus from their Web site and you can hear a sample of the voice here.

Steve Wozniak interview

0 Comments | This entry was posted on Jul 05 2007

Apple co-founder Steve Wozniak was interviewed by RU Sirius this week about being a prankster and ethical hacking.

From excerpts of the interview posted on 10 Zen Monkeys:

I have these professionally printed stickers that I’ve had made. They’re done with this sort of foil-type stuff in the exact OSHA style and the OSHA colors. And it says, “Danger: Do Not Flush Over Cities.” And I put ‘em in the bathrooms on airplanes…They’re red with a black-shadowed airplane picture. The bathroom has a little seat fold-down. I fold that up and there’s a sign in the middle of it saying, “Don’t throw trash here.” And I put my two little stickers behind it, so the stewardesses won’t notice it right away. If they notice it right away they might realize that somebody put that there. But after a while, if they slowly get used to it, they’ll stay on for years…

Hahaha. Go Steve.

Double spaces, Jetpacks, and Kitchens of the Future

0 Comments | This entry was posted on Jul 03 2007

Just stop. Please.

It’s always been a slight pet peeve of mine. I understand that back in the days of mono-spaced fonts on typewriters it was necessary, and that some still have those old bad habits. But this, my friends, is the future. OK, we still don’t have jetpacks and kitchens of the future, but we do have variable width fonts that aren’t meant to have double spaces after periods (or full stops if you’re in other parts of the world).

I’m not one to cite style guides, but single spaces after punctuation is considered proper according to the MLA, APA, and the Chicago Manual of Style. So neener-neener.

BSA offers $1 million to whistle blowers

0 Comments | This entry was posted on Jul 03 2007

The Business Software Alliance has just increased their reward for whistle blowers who report software piracy to $1 million. Although the initial campaign is target towards the U.S., it’s expected to expand internationally.

Read more