Posted by & filed under Web Development. 5,092 views

New and of interest: Twitter Bootstrap 2.2.0/

Previously, previously:

Posted by & filed under Open-source, Web Development. 6,097 views

If you’re looking to use the GitHub API outside a web application, you’ll need to generate an OAuth 2 token. GitHub provides a good way to add a non web app to your account. It’s done with a curl, command-line:

            curl \
            --user "myuser" \
            --data '{"scopes":["user"],"note":"GitHub Stars to Bookmarks"}'

which will ask you for your password and return a json document which will contain your token.

Your scopes selection might be different from mine, refer to this document to chose them.

You can check that this process went well by hitting: . You’ll see the application authorizations on

I am using this in my githubfav2pinboard application.

Posted by & filed under Android, Electronics, Personal. 20,427 views

NFC tag on office entrance
This could be the geekiest thing I’ve ever done.

While I have used Tasker on Android to change settings based on location, it doesn’t quite have the granularity that I am looking for and relies on precise GPS location to work really well (which hurts battery life).
NFC tag on nightstand
The newest flagship Android phone, the Galaxy Nexus (on Verizon or GSM for T-mobile & AT&T) and a few other Android phones (such as the Nexus S on Sprint & AT&T) support the NFC standard.

By placing NFC tags in my house (nightstand , house entrance, car, office), I was able to set up my phone to switch its bluetooth, wireless, ringer and other settings based on location.

For example:

  1. When I enter the office, after touching the entrance NFC tag, the phone’s wifi is turned on and the ringer is set to vibrate
  2. When I leave the office, the same action will disable wifi and set the ringer to a loud ring.
  3. When I enter my car, Bluetooth is turned on and my musica app will start playing tunes
  4. As I leave my car and swipe it again, bluetooth is turned off
  5. When I enter my home, wifi will turn on
  6. When I put my phone on my nightstand, the ringer will be set to silent

To do this, all I needed was a NFC compatible phone, NFC stickers (pre-formatted for a bug in Android 4.02 prevents formatting from working) and a $1.99 android application to set the actions taken when swiping a specific tag.

Geeky, right? I warned you

Posted by & filed under Mac OS X. 46,465 views

In a terminal, enter the following:

defaults write NSQuitAlwaysKeepsWindows -bool false
defaults write NSQuitAlwaysKeepsWindows -bool false
defaults write NSQuitAlwaysKeepsWindows -bool false

The same thing can be done for any application in Lion. In order to find the application preference name, look at the files names found here (minus .savedState): ~/Library/Saved Application State.

Et voila!

Posted by & filed under Electronics, Mac OS X, Video. 6,350 views

While large (24″+) monitors are certainly enticing, I find that my productivity improves with multiple monitors rather than bigger monitors. My desktop setup includes two 23″ monitors in Landscape orientation and a 22″ monitor in Portrait mode. While most laptop have a VGA, Display Port or DVI output, that only allows you to connect one monitor.

Wanting to have at least two external monitor, I found a great solution from Kensingon that will work on Mac and Windows PC to add an additional monitor (or two or three…) via a simple USB connection.

At under $60, the Kensington Universal Multi-display adapter works on most recent OS (including the Apple Lion and Snow Leopard, Microsoft Windows 7) is simple to use and just works. The adapter comes with a DVI output and a VGA adapter and support 1080p resolutions (1920×1080) in 16/9 format and 2048×1152 for other aspect ratios.

If you want to add additional monitors, just add more adapters, it’s that simple (up to 6 adapters, that’s 8 monitors total, including your laptop monitor).

Is it fast? It’s fast enough for most tasks. Would I use it for gaming or 3D design? Probably not but it works very well for everything else.

Posted by & filed under Android, Mobile, Open-source, Web Development. 34,410 views

While one would expect console.log() messages to show up in the Eclipse console tab (which shows the Android emulator being launched), they actually show up in the LogCat tab, a mechanism for collecting and viewing system debug output on Android. However the LogCat tab/windows is not shown by default on Eclipse.

In order to show the tab in Eclipse, select Window -> Show View -> Other… in Eclipse. In the Android section, select the LogCat view which will show log messages for the emulator including your console.log messages under the “Web Console” topic. In order to isolate them click on the green cross to add a Filter, name the filter and assign “Web Console” to the Log Tag. By clicking OK, you’ll show only the Web Console messages including JS errors and your console.log output.

Posted by & filed under Android, Mobile, Open-source. 5,118 views

After reading my friend Steven O’Grady excellent Xoom review and selling my iPad (1) in anticipation of the iPad 2 announcement, I decided to pick up a Motorola Xoom to test it and possibly keep instead of buying the newer iPad. I was told at Best Buy that their new return policy was 14 days with no restocking fee so I thought it was a good opportunity to test Google/Motorola/Verizon’s last offering. I had similarly bought a Nexus One in early 2010 and abandoned the iPhone in favor of that Android (2.1, then) phone.

I will be returning the Xoom.

I won’t pontificate about it but the geist of it is that I don’t like the hardware. As Steven mentioned there are software issues:

  • Force close (Application crashes) – haven’t had any on my 2.3 Nexus One in 6 months but getting quite a few on Honeycomb
  • Application availability – in my opinion only Gmail & the Browser are great apps today, the rest is mediocre (including the Android Market tablet application offering)
  • Random reboots (though that could be hardware) which I had three of in 5 days, compared with 3 in a year of iPad use
  • UI annoyances – lots of good things but lots of bad choices. Typical in google products

But that’s the software and it can be fixed. My problem was with the hardware:

  • The aspect ratio is just wrong. When the iPad was initially announced I was annoyed at the 4:3 ratio but I am now convinced it’s the right aspect ratio for a tablet. It’s not ideal for movies but it works very well for everything else. The Xoom aspect ratio works great for movie watching but is cumbersome for anything else. It’s too wide in landscape mode and it’s too long for portrait mode. It also make the tablet awkward to hold
  • It’s too heavy. I realize it’s only a few ounces heavier than the Adversary but it really feels like a pound of lead strapped on the back of the iPad. That’s how it _feels_.
  • The edges are kinda sharp, it’s not comfortable to hold
  • The screen is nothing to write home about besides being of a higher resolution than the iPad

I said I wouldn’t pontificate so I am keeping it short. There are a lot of good things about the Xoom but the hardware mostly falls short for me and as Steven said, you can’t change the hardware. The Xoom won’t work for me, I will be picking up an iPad 2 next week.

I’ll revisit in a year.