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

Flash is (or is not) coming to the iPhone

0 Comments | This entry was posted on Feb 10 2009

Somewhat of a sore spot for Flash and iPhone developers, the hope that the Flash player would make its way to the iPhone is still very much up for debate. A recent quote from Adobe CEO, Shantanu Narayen, has some left some believing it’s very much on its way and others thinking it’ll never make it.

“It’s a hard technical challenge, and that’s part of the reason Apple and Adobe are collaborating,” [Adobe CEO Shantanu] Narayen told Bloomberg Television at the World Economic Forum in Davos, Switzerland. “The ball is in our court. The onus is on us to deliver.”

Some claim the Flash Player could never be written in a way that would sit well with the ARM processor. The power requirements of running such an app would be too much for a mobile device. Others have said it’s a political/business decision on Apple’s part.

Who knows. I just hope it finally makes its way to the iPhone platform. I think it would open development up to a lot more people that don’t feel like trying to wrap their brain around Objective C. Apple still has very strict control over what applications make it to the iTunes store, so the concern about quality of apps shouldn’t be an issue.

I personally feel that it’s more political than anything else. But, I’m a cynic.

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.

Seam carving for content aware image resizing

0 Comments | This entry was posted on Aug 22 2007

Ariel Shamir and Shai Avidan have come up with a method for “retargeting” photos. An algorithm is used to detect horizontal and vertical seams of pixels with the least gradient magnitude. This path of pixels can then be removed from the photo, shrinking it in size, but preserving the rest of the photo. To increase the size of the photo, pixels are added along the determined seam.

You can view a higher resolution movie at Ariel Shamir web site. There is also a pdf available, however server speeds prevented me from actually downloading it.

Tsukuba – nonsense instruments

0 Comments | This entry was posted on Aug 09 2007

8BitBoy – Andre Michelle

0 Comments | This entry was posted on Jul 30 2007

http://8bitboy.popforge.de/

Karsten Obarski invented 1987 – twenty years ago – the MOD format for his Ultimate Tracker running on Amiga computers. Since then, countless songs are created, especially for the demoscene.

MODs have special attributes. All samples are stored in 8bits and the number of voices is limited to four. To have something similarly to chords, the three notes of it are repeated very fast. This makes MODs sound so freaky.

Finally 8BitBoy brings those songs back online.

Neural Interface – Controlling objects

0 Comments | This entry was posted on Jul 28 2007

Pretty sick. The applications are endless!

Helping the handicap and assisting astronauts is cool and all, but what about as a TV remote? Just think, you’d never have to waste your precious energy pushing those remote control buttons any more. If the consequence of sloth is only a pit full of snakes, bring it on.

iPhone hacked?

0 Comments | This entry was posted on Jul 24 2007

Security researchers claim they have found a hack to get confidential data from the iPhone.

By creating a malicious html page, and then pointing the phone’s Safari web browser at it, the hackers were able to access all sorts of private information from the phone. Not good news for private individuals – but even worse for organizations when you consider that recent research estimates that more than 50 percent of staff regularly copy files from the corporate network to their personal storage devices.

Read the full article here

(from watchyourend.com)

iPhone, Will it Blend?

0 Comments | This entry was posted on Jul 11 2007

iPhone advertisement remix

0 Comments | This entry was posted on Jul 11 2007

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.

DVD Jon – hackin’ the iPhone

0 Comments | This entry was posted on Jul 04 2007

Jon Lech Johansen, aka “DVD Jon,” claims he has activated an iPhone without service through AT&T. Although the phone function doesn’t work, everything else does. Johansen says the purpose of this little exercise was for people that don’t wish to enter into a 2-year contract with AT&T and would rather just use the iPhone as a pimped out iPod.

Visit Jahansen’s blog for more info and downloads

There’s other ways of doing this too, which involves purchasing and then canceling a prepaid plan from AT&T.

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