15th Feb 2008

A Complete Listing of All Files Installed by HP Installer.app, When Trying to Install an HP Printer Driver

Can you guess how many files HP Installer puts on your computer? 100? 500? 5,000?

No. You’re Wrong.

It’s 51,542 files.

I got a whole list using my friend shell command lsbom, and here it is. (5.2MB text file – YES, 5.2 MEGABYTES OF JUST TEXT EXPLAINING WHAT IS BEING INSTALLED AND WHERE.)

HP, I hate you. All I want is a damn driver, not a whole other OS.

Posted by Posted by patrick under Filed under Uncategorized Comments 1 Comment »

20th Jan 2008

How-To: Make Your Own CD/DVD Lens Cleaner and Fix Your CD/DVD Drive Yourself

I ran into a problem this weekend. I upgraded my MacBook Pro’s hard drive to a 320GB Western Digital drive (win) and decided to create a boot camp partition with all my new free space I had, so I could play TF2 with friends. Upon trying to do this, however. I discovered my superdrive has decided to stop reading CDs. DVDs worked fine, but CDs? Nope. How could I install Windows then?

I tried several ways. I tried copying the CD to a DVD and using that, but it caused the Windows installer to crash. I also tried using VMWare Fusion, which just didn’t recognize the Boot Camp partition (probably because there was nothing on it). I tried copying a boot camp partition from another mac, as well as using Parallels to install it, both unsuccessful.

I was starting to think that I would have to replace the drive, when it dawned on me that I might be able to fix it using one of the CD Lens cleaner things. I’ve never used one before, so I was skeptical, but more than that, I was lazy. I didn’t want to drive to the store in -13 C weather and pay $10 for some special “cleaning CD”. What was so special about these CDs anyways? I decided to find out.

Seconds of googling turned up this image:
Lens Cleaner

It was painfully obvious. It’s just a piece of friggen felt glued on to a CD! I can do that! So I did. Behold:
MY Lens Cleaner

What is it? Simple really, a piece of a Swiffer brush I had laying around my room scotch tapped to a CD. I put it in, listened to it spin up a few times, then popped it out. Sure enough, CDs now read fine.

DISCLAIMER: It’s not my fault if you break your drive my trying this. It worked for me, but if you’re stupid (or more likely, unlucky) bad things might happen like the felt coming off inside your drive, then you’ll be screwed. So pray that doesn’t happen.

Posted by Posted by patrick under Filed under diy, how-to Comments 1 Comment »

18th Jul 2007

How-to: Pop-up Menu Selection AJAX in Rails

The problem: In Rails, how do you create a popup menu that calls a given action (to replace a div or whatever else) and passes the selected option as an argument when a new selection is made?

This took me way longer than I thought it would to figure out how to do, so I’m posting the answer here as well for anyone trying to do the same thing.


< %= select_tag :person_choice, options_for_select(@persons),
:onchange => remote_function(:update => “divToBeUpdated”, :with => ‘Form.Element.serialize(this)’, :url => { :action => ‘update_person’}) %>

The key here is the :with => ‘Form.Element.serialize(this)’ option. It’s a bit of magic javascript that passes the selected object along with AJAX call, but I actually don’t really understand it much beyond that. If anyone wants to give me a more thorough explanation, it would be highly appreciated.

Huzzah!
Update: Props to OnRails.org.

Posted by Posted by patrick under Filed under ajax, code, how-to, rails, ruby Comments 1 Comment »

01st Jul 2007

Using Google Apps for Your Domain email on the iPhone

I crumbled and bought an iPhone. Thus far, I love it. It’s the first ’smartphone’ (although the iPhone is more like a ‘geniusphone’) I’ve ever owned, meaning it’s the first that can do email and has unlimited data usage - something we don’t see in Canada.

On first sync, I noticed none of my 3 email accounts worked. I realized right away that it was obvious that both my school and photography emails wouldn’t work, since they were set up to use localhost as the mailserver (since I tunnel them through SSH). My SSL-enabled Google Apps for Your Domain email, however, was not working without reason.

I tapped my way to the settings to discover that the iPhone saw the ‘pop.gmail.com’ server address and assumed I was using a gmail account, so it appended a non-optional ‘@gmail.com’ string to my existing email address, making it look like ‘foo@bar.com@gmail.com’, which was obviously causing the problem.

A couple of other people have run into this problem on the Apple Discussions board as well as the Google Group for the Apps for Your Domain stuff. Thus, I offer a very simple solution:

In Mail.app, change the POP mail server from ‘pop.gmail.com’ to 209.85.199.109, the IP address of the same server. The iPhone won’t recognize it, so it won’t attempt to change it, and everything will work fine.

In addition, I highly recommend changing your username on the iPhone to ‘recent:food@bar.com’, so that Google’s email server knows to send you the most recently received/sent emails, even if they have already been POP’ed off the server by your home machine.

Enjoy your iPhone!

Posted by Posted by patrick under Filed under googleapps, how-to, iPhone Comments 1 Comment »

24th May 2007

/status

It’s been almost 2 months since my last post, so I thought I’d make a status update on what I’ve been up to.

I finished my 4th year of my program, with one more to go. Next year I’m going to get to take some awesome courses, included another Advanced Artificial Intelligence course and more importantly, my final project / research project. I’m still not sure what I’m going to do for that. Being partial to Mac OS X, I’d like to do something that I could write a nice Cocoa interface for. I’m kind interested in doing something with OCR (Wouldn’t it be great to break all those stupid captcha image fields?), AI, Neural Nets, or HCI (Mmm, pie menus). If you have suggestions please let me know.

This summer is shaping up to be pretty awesome. Although my Google Summer of Code application to write unit tests for Adium was accepted, I had to turn it down as I was offered an internship with Apple. As honoured as I would be to get a chance to work with the Adium team, the opportunity to work at “the mothership” is one of that no CS student can turn down. It is certainly a huge opportunity for me, and I hope to do my best to impress, learn and produce at Apple. That being said, I’m taking off for Cupertino, CA, on Sunday. I’m very excited to meet all the other interns and start work.

Further, I’ve also been lucky enough to receive a WWDC Scholarship. I don’t know how much of the conference I’ll be able to attend while working, but I’ll certainly be around. It sounds like a couple members of the Adium team are going to be there, so if a meet-up happens, you can count on me to get some photos. :)

That’s all for now, more updates to follow.

Posted by Posted by patrick under Filed under Summerofcode, apple, me, meta, school, wwdc Comments No Comments »