RSS

Force Apple Mail to display plain text by default

1 Comment | This entry was posted on Jun 10 2010

Testing multipart emails can be a pain when you can’t choose whether you want to see the plain text vs the html version of the email. If you use Apple’s mail client however, you can set a preference on which version you’d like to see by default.

Just open up a terminal window and enter the following:
defaults write com.apple.mail PreferPlainText -bool TRUE

To return back to normal, just enter the same thing, but set it to FALSE.

Spilling Coffee on your MacBook Pro

0 Comments | This entry was posted on May 20 2010

I did it. After hearing all the horror stories and thinking it would never be me, I managed to dump a very full cup of coffee on my 17″ MacBook Pro. While attempting to squeeze in a few minutes of work this morning before I left for the office, I accidentally bumped my coffee cup. My reflexes fired and I tried to catch the cup. In the process of doing so I only made matters worse and thus sealing the fate of my beloved MPB. Luckily my instincts kicked in and I immediately tilted the laptop in such a way that hopefully all of the coffee that made it inside went to the bottom towards where the track-pad is, and away from the logic board.

So what next…

I’m not sure if what I did and what I am about to tell you next is the correct way to deal with the situation, but I guess in a few days we’ll see if I’m the proud owner of a worthless hunk of aluminum.

Step 1

Tilt the laptop so the moisture drains away from where the logic board is. The board is approximately located towards the back and extends down to about where the space bar is. It starts on the left side and ends about where O and P keys are.

Step 2

Unplug and power down as quickly as you can. The faster you do this, the more likely you are save your system from getting fried. Don’t worry about shutting down your system properly at this point. You’ll probably survive that, it’s the hardware we’re worried about. So – press and hold that power button until the screen goes black.

Step 3

Set your laptop on top of something absorbent like a towel, and get some air moving. Heat is probably a bad idea, so it’s probably best to just use a fan. Remove the back cover to expose the components inside. There are 10 screws holding the back plate on. It is probably a good idea at this point to find a small container to place all of your screws in, so you avoid losing them.

Step 4

Warning the next step will void your warranty.

Remove your battery from the system. Apple, being the jackasses they are, use special screws to hold the battery in place. After a trip to RadioShack, the MacStore and my local hardware store I found that nobody carries the correct screw driver for this. However, I found that my cheapo precision screwdriver set has a flat head 2.4mm one that will work anyway.

Make sure your warranty isn't important to you before proceeding! :)

Step 5

Dry up any excess moisture you can. And keep that fan running

Mmmm. Coffee...

Step 6

Finally, and most importantly, DO NOT give in to the temptation of putting things back together and firing up your laptop before it’s had a chance to completely dry out. If you do, you might fry something (if it isn’t already). I plan on leaving my as is for a few days just to make sure.

Gratuitous nerdy shot. Hey, I thought it looked neat and was curious how well my macro settings worked on my Cannon XSi Rebel.

Controlling iTunes remotely

1 Comment | 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