May 23, 2013

Twitter API: 401 Unauthorized

Symptom: Twitter API returns a 401 Unauthorized when you start the OAuth process by obtaining a bearer token. This can happen all of a sudden possibly breaking existing processes that were working.

Wat?

Problem: The most likely culprit is the clock on your server. If this gets out of sync (even by as little as 20s), Twitter’s amazing API will barf and return a helpful “401 Unauthorized”

Solution: A simple

sudo ntpdate ntp.ubuntu.com

should fix it.

May 16, 2013
#moleskine #stickers

#moleskine #stickers

May 15, 2013
This got a lot of attention today #javascript #tee

This got a lot of attention today #javascript #tee

May 13, 2013
New #earbuds #monster

New #earbuds #monster

Mar 20, 2013

MongoDB 2.4.0 EXT4 Readahead Warnings

After deploying MongoDB 2.4.0 for the first time and connecting to it from a remote shell, it warned me:

MongoDB shell version: 2.4.0
connecting to: abc.com/test
Server has startup warnings:
Wed Mar 20 22:40:49.850 [initandlisten]
Wed Mar 20 22:40:49.850 [initandlisten] ** WARNING: Readahead for /data/db is set to 2048KB
Wed Mar 20 22:40:49.850 [initandlisten] ** We suggest setting it to 256KB (512 sectors) or less
Wed Mar 20 22:40:49.850 [initandlisten] ** http://dochub.mongodb.org/core/readahead
>

The fix for this turned out to be:

sudo blockdev --setra 256 /dev/md2

Where /dev/md2 is the disk where the database files are stored.

Mar 15, 2013
New toy #lego (at The Lab)

New toy #lego (at The Lab)

Mar 12, 2013
#wat #hair #creepy #dolls

#wat #hair #creepy #dolls

Mar 10, 2013
The perfect setup is coming together nicely. (at The Lab)

The perfect setup is coming together nicely. (at The Lab)

Mar 9, 2013
Chilled with him at the Toronto Zoo today #latergram (at Toronto Zoo)

Chilled with him at the Toronto Zoo today #latergram (at Toronto Zoo)

Feb 20, 2013
Blue Galaxy S3 on the north bond track at union station.

Blue Galaxy S3 on the north bond track at union station.

Navigate
« To the past Page 1 of 6
About