I Have Snacks University life, work, food, and technology – it's all so good

25Dec/100

Almost-Free Pandora in Canada Using a CentOS-Based VPN

One of the things I miss about living in the USA was the ability to listen to music using Pandora.  So when I got back to Canada, the only way I could actually do that was by setting up an SSH tunnel to my web server in the USA and accessing the Pandora site through my browser.  It's simple enough for people that can always use SSH for situations like these, but what if you're not always at your computer when you're listening to music through Pandora, say, through your iPhone?  Well, that's where it gets a little tricky...

21Nov/100

Two busy, but fun two weeks (and TWiT!)

I've been less involved with my own personal projects and Unbounds work these past few weeks since they've been pretty eventful with other stuff.

Two weekends ago, I was in LA with my roommate Craig, my work colleague Mitchell, and his buddy Mike.  Basically spent the weekend doing the usual touristy stuff.  We visited LA, Hollywood, Beverly Hills, Bel Air, and Santa Monica.  We did a lot of stuff in such a small amount of time, but it was definitely a lot of fun and totally worth it.

The week after this, I received some Tropo swag for my last blog post - thanks guys!

Last weekend, my parents were in town.  They did the touristy stuff on their own for a few days while I worked.  We drove around the Bay together, took some great shots, and even went up and then down Lombard Street (which was both terrifying and a lot of fun at the same time).

This weekend, in particular, was pretty busy.  Friday night, I was lucky enough to get a ticket to watch Harry Potter 7: Part 1.  It was an awesome movie and I can't wait for Part 2!  Yesterday, I took a drive down to the Gilroy Premium Outlets for some shopping and then met up with my buddy Adam and his roommate Tarek for an awesome Korean BBQ dinner at Ohgane (highly recommended!).  Today, I was an audience member on episode 275 of TWiT.  Joey Robert and I booked seats for this show back in September not knowing who would be on, so we were pretty excited when we found out Kevin Rose was going to be a guest on the show.  Leo Laporte and the gang were awesome, and his staff were very hospitable.  I thought it was pretty cool to be introduced on the show and then take pictures with both Leo and Kevin.  Thanks guys for an amazing time!

I'll probably be coding a bit more this week and next, up until my trip to Las Vegas, so I'll probably come up with something a bit more interesting to blog about by then.  In any case, check out some pictures of these past two weeks after the break!

30Oct/101

An Introduction to @Tropo

Tropo is a Cloud API for voice, SMS, and IM.  It's kind of similar to Asterisk wherein you can use it to build your own digital PBX by writing up some simple code.  But really, it's more than that.  Because it not only supports voice, but SMS and IM as well, the integration possibilities for this API are endless.  Need to send out voice and text alerts to people?  You can do that with Tropo.  Need to have conference calls with other people?  You can do that with Tropo.  Need a support hotline with automatic call queueing, call recording, on-call games, text-to-speech and speech recognition support, and a way for customers to pay by phone?  I think you get my point by now.

30Oct/102

My MacBook Pro Got an Unexpected Shower

At the beginning of last weekend, I was sitting at my desk with a bottle of water while watching some TV shows.  As one of the shows ended, I reached for my mouse and accidentally knocked that bottle over onto my (nearly) three-year-old MacBook Pro.  BIG WHOOPS.  My first instinct was to unplug it from everything and shut it off immediately, followed by taking the battery out.  Next, I flipped it over to drain out the water that had just fallen on the keyboard and started to dry it out on a towel.

22Oct/100

PHP Retweeter

This past week, I've been coding a little more than usual (outside of work, anyways).  I've been working on a few personal things as well as some freelance stuff.  But what this post is really about is a little script I put together a while ago to operate a Twitter bot, one that retweets things other users say and follows them back if they reply.  I call it the PHP Retweeter (for obvious reasons).  It's pretty cool.  The concept itself is pretty old and there are probably a ton of guides out there on how to put one together, but I figured I'd release mine to give people yet another alternative.  I based it on Abraham Williams' OAuth library for authentication and to send my API calls.  Download it and give it a try.

17Oct/100

A Day of Touring, Making Dinner & Dessert, and Smoking from a Hookah

Yesterday, I made my way into San Francisco to meet up with a bunch of Waterloo co-ops from Los Angeles who were in town for the weekend.  We spent the day doing some touristy stuff: visited Fisherman's Wharf, Golden Gate Park, the Castro district, the Painted Ladies, etc.  It was pretty fun, but the walking tired us all out by the end of it and then we went our own ways.

The Painted Ladies & I

The Painted Ladies & I

Later on in the day, I made my way to my buddy Adam's place without really knowing what we were going to do.  When I got there, we were all pretty hungry and decided that it would be best to go grab some food.  We passed by a grocery store around the corner and ended up making some really tasty tacos for dinner and struggled (a bit) to make a strawberry cheesecake for dessert.  We were a little worried with this recipe when it called for mixing warm condensed milk with the cream cheese (since it would melt), but overall I think it came out pretty well when it was finally done.

17Oct/10Off

Facebook’s “You are already a member of this network” Bug (UPDATED)

UPDATE: As of at least 08/16/2011, neither of the methods listed in this blog post will allow you to remove yourself from a network (i.e., they no longer work).

Recently, I ran into a situation where I no longer wanted to be part of a specific network on Facebook due to privacy concerns, so I left it (or so I thought).  A few days ago, I changed my mind and wanted to add myself back to that same network.  Unfortunately, for me, even though Facebook did not list that network anywhere on my profile or in my account's settings, it still "thought" that I was still part of it, either because whoever wrote the function for a user to leave a network didn't do a good job at it or because the original function call when I initiated the request got interrupted somehow.

Facebook's "You are already a member of this network" Bug

Facebook's "You are already a member of this network" Bug

Figuring this was a common bug, I did a search for the error message and found this.  It wasn't much help, but at least I knew I wasn't alone.  I tried contacting Facebook to look into the bug, but got nothing but an automated response.  After looking around on and fiddling around with my account's settings pages, I figured there might be a way to force the site into making me leave the network a second time.  Find out what I did after the break.

UPDATED: I've added step-by-step instructions on how to fix this with some additional screenshots.  Check it out after the break.

4Oct/100

How To Setup Asterisk@Home

About 5 or 6 years ago, a high school friend of mine, Alex Blank, approached me and asked me to help him out with an article he had been asked to write on the Asterisk@Home (now Trixbox) PBX system.  At the time, I had a pretty rough idea about what a PBX and VoIP was, and Asterisk was fairly new, so I had quite a bit of catching up to do in order to understand where we were going with this.

3Oct/100

VPS Cost & Benefits with an Example using Magento

About a year ago, I gave a presentation on the cost and benefits of using virtual (private) servers (VPSs) (the topic of my choice) to a small group of my university colleagues as a requirement for my degree.  In it, I gave a brief overview of how a VPS differs from a regular server, the different steps involved, and then I went through the cost and benefits.  Finally, I talked about a small case study (a previous co-op employer of mine). You can go through the whole presentation after the break.

In addition to talking about VPSs, my last work term report was on the load analysis of Magento on a VPS. It talks about ways of optimizing Magento to run on a limited amount of resources and gives the pros and cons of doing so. You can also go through the report after the break.

3Oct/100

Setting Up a SMTP Server with Postfix

A few months ago, my university (University of Waterloo) blocked the ability for students to send e-mail from their university-issued accounts from within Gmail.  Essentially, what they did was block Gmail from connecting to the university's SMTP servers to send e-mail through them (not to them - there's a difference).  Students could still send e-mail from within Gmail with their university-issued accounts as long as they opted to use Gmail's own SMTP servers, but this would usually append their personal Gmail addresses to all e-mails sent out and make them appear as being "On Behalf Of x@gmail.com".

For privacy and other reasons, university staff usually ignore all e-mails sent form personal e-mail accounts or those appearing "On Behalf Of" someone's personal e-mail address.  Because I use Gmail as my e-mail "hub" or client, since I can access it pretty much anywhere, I needed to find a workaround.  After some thorough research, I chose to setup my own SMTP server on a VPS I have using Postfix in combination with SASL and SSL/TLS.