How to create a Ruby DateTime in a specific time zone for a Rails app?

# Use = "Pacific Time (US & Canada)", month.to_i, day.to_i, hour.to_i, minute.to_i, second.to_i)   # use ActiveSupport ActiveSupport::TimeZone["Sydney"].parse("2011-04-12 2pm")   # use Time.find_zone Time.find_zone(’Alaska’).local(2011,1,1)

Rspec testing mailer

How to test mailer sending an email Mailer.should_receive(:weekly_email).and_return(double("Mailer", deliver: true)) Also look at “and_call_original”

Weird UTF error

Solve it with: ALTER TABLE peek_production.posts CONVERT TO CHARACTER SET utf8;

I forgot my mouse at work

I love my mouse. Unlike other self-respecting hackers, I use mine a lot. My first computer ran Windows and I also used to game, so that’s a given. It’s a Logitech G500. I’ve used Logitech since forever and couldn’t see myself using a different brand. But today, I forgot it at work. The mini-panic set in […]

The rise of the (shitty) landing pages

This post is dedicated to entrepreneurs, founders or anyone out there who are using landing pages while they work on their new startups and projects. With the rise of Launch Rock, a service that helps people quickly create simple landing pages, I feel landing pages are being misused. Landing pages collect email addresses, but their […]

Knowledge is power

Today, I pulled this out from a fortune cookie. Not to say I expect anything from a fortune cookie, let alone truths. However I wanted to write something about this small phrase, one that has haunted me throughout my childhood. As a child in a typical Asian family, I was drilled that knowledge is, indeed, […]

Day #2 of morning roadwork

In an effort to turn my life around, I’m starting to run again. I’ll be running for an hour each morning, 6 days a week. 2 days will be reserved for interval training, and the rest will just be normal running. I’m thinking the schedule would be like this: Monday: Running Tuesday: Interval training Wednesday: […]

Wow, regarding the mess surrounding Skype and Silver Lake

Regarding the crap that’s going on: What’s the point of a “cliff” and “vested” shares when those shares just get bought back at the original price eventually? Talk about biting the hands that feed you. And I used to dearly love Skype, one of my favorite piece of software. Whoever at Silver Lake […]

Tanking the YC interview, lessons learned

  We just had our YC interview for Munchery, and yesterday I found out that they decided not to fund us. It’s a well-known fact that PG funds the team instead of the idea, so I guess we did not appear to be impressive enough. I know the interview went too fast for me, I could […]

Munchery is my first company

This is going to be some ramblings from me. I write because it helps me think. You probably won’t find this useful. Anyway… ———– Before your first company, you owned no company. You had no real control. You could not do anything you want. The world was not your oyster. But like your first love, […]