Wednesday, November 21, 2018

Seeing ints instead of booleans from your memcache?

The latest PyLibMc has changed the way in which booleans are stored from strings to integers to avoid conflicts in which python-memcached manages them. The end result? If you were noticing that your cache is returning ints instead of True/False, this change in PyLibMC cached this issue!

If you have API responses that are returning invalid values, you'll need to wrap the value in bool() to fix the issue!

Friday, November 24, 2017

Testing SSL on Erlang

{ok, ListenSocket} = ssl:listen(8443, [{certfile, "server.pem"}, {keyfile, "server.key"}, {cacertfile, "server.chain"}, {reuseaddr, true}]).
{ok, Socket} = ssl:transport_accept(ListenSocket).
ok = ssl:ssl_accept(Socket).

Wednesday, March 9, 2016

Project Fi and B010 error codes

  • If you purchase a Google phone, make sure to buy it under the account that will activate the Fi service.  Otherwise, you will end up seeing B010 error codes when trying to activate!

    Otherwise, you will have to call Project Fi specialists and have the "asset id" transferred to the account owner that intends to activate service.  You need to have both parties on the phone to have this info transferred.  This lesson took 3 weeks to resolve after calling multiple times to their 24x7 support line!
  • Google Fi leverages the Google Voice infrastructure.  You have to decide upfront whether to port your existing Google Voice line or port your cell phone.  If you decide to test out Project Fi and wish to bring your own phone line over later, you must cancel the service and then order another SIM card.  Google currently has no way of letting you to try before committing.  

Thursday, April 23, 2015


Redcarpet is a Ruby library for rendering markup language.   When updating a CodePath Wiki guide entry, which hosts these documents outside of GitHub, I noticed that the list items not to be including the image tags that I used in a separate line:

1. Inside the Google Play Store for your project, navigate to `Settings` -> `API Access`:

    <img src=""/>

I would see:

<li>Inside the Google Play Store for your project, navigate to...

<p><img src=''/&amp></p&amp>

But if I added 4 spaces to the image tag, the problem went away:

1. Inside the Google Play Store for your project, navigate to `Settings` -> `API Access`:

        <img src=""/>
Turns out that a change was made in Redcarpet v3.1.0 that changes the parsing behavior so that at least 4 spaces are needed for the line to be considered part of the list item.  It also is very likely that GitHub must be using an older version of this library, since this problem doesn't appear on native GitHub Wiki pages.   If GitHub should ever decide to upgrade to this new library, they're likely to cause their Wiki collection to experience similar problems!

Monday, March 30, 2015

Brain surgery on a Nexus 5

A few days ago, my Nexus 5's display started turning colors.  A few minutes later, it stopped showing.

Rather than buying a new phone, I decided to see if it could be repaired with some surgery.  I bought a $70 replacement frame and digitizer and $5 in tools.  The video walkthrough seemed pretty straightforward right?

Little did I realize that I would have to move everything from the old unit to the new frame, including the two power buttons, the battery (the video warns about puncturing and inhaling the toxic chemicals), the front and back camera, antenna board, and the main CPU.   Not to mention the microphone pieces (watch very carefully the video about the additional part you must bring over too!)

You don't really need a dryer gun since the adhesive is pretty easy to remove.  The tricky part is getting the shell of the phone off -- they are connected with small snap-ins that can break if you're not careful. Once I managed to get a few of these snap-ins loose, I could use a flathead screwdriver to remove the rest around the edge.  The video also shows what you need to do if you don't have a replacement digitizer like the part that I ordered -- I skipped over that step.

3 hours later, after making sure every single part was moved over (again, check the microphone and the part that sits below it!) it's working great. At first I thought I had failed because only the screen turned on. The battery had apparently drained so upon plugging in, I was able to see the Android Lollipop screen.  My only major issue is that I may have damaged on of the two antenna ports on the board, but the phone operates fine with just a single one plugged into it.  I plan to solder the other cable onto the socket just in case.

Nonetheless, I hope I just saved myself $400 on a new Nexus phone!

Wednesday, February 11, 2015

Want to verify your W2 submission form?

A few weeks ago, I got a letter from the SSA notifying me that my electronic employer W2 submission was wrong. I knew it was related to the electronic file format generated by Wave, but wasn't sure what was happening. After waiting 2 weeks for a response from their support team, I decided to write a small script to figure out what was happening...

It confirmed to me that their generation was off by a factor of 10.  It was fixed later by the company without notifying customers about the issue.

Also, it turns out that the SSA provides a Java applet called AccuWage that allows third-party companies to verify that their file format generation is correct...