Sunday, August 9, 2015

It's true...

Nerds really do like Subarus.

Previously.

Saturday, May 23, 2015

Extracting Base64 Images from Google Keep Archives

I love Google Keep! It's a nice-looking note-taking app with more features than I ever use.

But once I made the mistake of staring a photo album in Keep. (If you don't know, you can add photos to a note either by taking a picture or finding on on 'disk.') To my chagrin I discovered that there's no way to get these photos out of Keep.

So I was super happy when I saw that Google Takeout now exports Google Keep files. "Great!" I thought, I'll just download my whole archive and grab those files. Again, much to my chagrin, I discovered that the photos were not in the Takeout archive as JPG files, but rather encoded as base64 strings inside the html page. So for example, I have a note called "Dogs" and all the photos are base64 encoded inside that "Dogs.html" note in the Takeout archive.

This is seriously annoying.

So, I wrote a Python script to get these images out. It's called the "Keep Photo Dump."

To use it you have to have Python installed. At the terminal, you would run:
./keep_photo_dump.py Dogs.html

and all the images in the file will be dumped as Dogs1.jpg, Dogs2.jpg, etc.

Hope this helps someone else.

Saturday, March 28, 2015

Ctrl-down/up in emacs in Mac Terminal

Finding the answer to this online pretty much drove me nuts. I'm sharing it here for you, future Internet user.

Here's the situation:
  • I use Emacs
  • I use Emacs in the Mac Terminal
  • \C-down was bound to forward-paragraph by default (and \C-up bound to backward-paragraph by default).
  • I wanted them to actually work, but they didn't.
Through some series of trickery I was able to figure out that the Mac terminal was sending the wrong escape sequences for cltr-up and down. Specifically, it wasn't sending anything at all, beyond just the down key. I fixed it with the following settings:
  1. From the terminal, go to "Preferences" "Settings" "Keyboard"
  2. Look for and modify, or add actions for ctrl-up and ctrl-down:
    1. ctrl-up = \033[1;5A
    2. ctrl-down = \033[1;5B

Sunday, March 1, 2015

Jane Bowman Stuckey

Here's the obituary for Jane Bowman Stuckey, my grandmother. She was an incredibly smart, and funny woman who lived a really interesting life. We will definitely miss her.

Jane Bowman Stuckey passed away peacefully in her home on February 27, 2015 in Austin, Texas at the age of 91.
She is survived by her children Dr. Barbara Beckman and her husband Dr. Edwin Beckman of New Orleans, Louisiana; Holly Brandt, and her husband Dr. Thomas Brandt of Austin, Texas; her son and his wife Jay and Ira Stuckey of Houston, Texas; her 6 grandchildren; and 9 great grandchildren. She is preceded in death by her husband of 65 years, James H. Stuckey.
She was born to the late Esther and Glen Bowman on September 5, 1923 in Highland Park, Illinois. At the age of six, her family moved near Harlingen to help her grandfather with his citrus orchards. In 1940, she graduated from Harlingen High School where she played the piccolo in the marching band. She attended Sophie Newcomb College in New Orleans before returning to the Valley where she met and married her late husband, James H. Stuckey in 1942.
At the time of their marriage, Jim Stuckey was a radio operator with Pan American Airlines. When an opportunity to transfer to South Africa came along, Jane talked Jim into it. They spent several years there before moving to Houston in 1951.
After moving to Houston, she became an avid golfer. She remained a voracious reader throughout her life. She especially enjoyed reading the Man Booker selections each year when they were announced. She was always aware of current events, and impressed her grandchildren with her sharp mind and knowledge of the world. Jane considered herself to be a ‘birder’ who traveled the world looking at exotic birds. 
There will be a private family celebration of Jane’s life in Houston. In lieu of flowers, please send donations to Austin Hospice at 4107 Spicewood Springs Road, Suite 100, Austin, TX 78759 or a charity of your choice that reflects Jane’s love of birds and nature. The family would like to thank Hospice Austin for their care and support during this difficult time.

Sunday, February 22, 2015

Konzentriertsichaufeinigedingetpunterausschlussanderer

Something occurred to me while I was taking a shower this evening. It was almost a daydream. I was imagining looking for a specific type of service person by emailing some mailing list, and then having to apologize because I didn't know more about this particular industry. This one thought lead my brain off on its own.

We all know that time in life is short. And there is no lack of things that we can learn about, study, research, become an expert (or even amateur) in. And I wish we had a word for describing those particular things I have chosen to be interested in as opposed to all the other, equally valid to be interested in.

"Interests" sort of seems to describe it. But that's not quite what I'm getting at here. Think of the "causes" you care about. For me, it's probably the death penalty (i.e., repealing it in the US) and the environment. Many of my friends care deeply about poverty, and women's rights. Don't I care about poverty?! I certainly believe that I do. But I have not studied them, I do not generally consume all articles about them, and most importantly I often don't know enough to have strong opinions about, say what should be done to help those in need in my city.

A lot of my coworkers have spent a lot of time learning about home repair, or stereos or electronics. I think those are all valid things to be interested in, but I know almost nothing. If I want to buy a new stereo, I just ask one of these people and more or less buy exactly what they tell me. Or decide that the good ones are too expensive, and give up.

This is, I think, totally normal. There's only so many things you can invest yourself in passionately. And there's opportunity cost to everything you choose to do.

Going back to the title of this article, there's probably a German word to describe what I mean, but no English one. And I truly think that's a shame, since in many ways life is all about choosing which things to focus on at the exclusion of other, equally valid, equally important things. 

Thursday, January 15, 2015

Tech Videos Worth Watching: DNS

Here's another one from Defcon 21, which is just like the gift that keeps on giving for me. This guy is doing some really scary stuff with DNS, and as a security noob myself, it's really fun to learn about.


Friday, November 21, 2014

Email Response Time

Ever since I started a full time job, where I spend nearly all day answering work emails, it seems I am less and less interested in responding (or even reading) personal emails. At some point I realized Iwas being slow to respond, but I wanted to know, just exactly how slow.

So, I graphed it (numbers in days):

This data  comes from a Google App Script I wrote. Here's the source. Google App Script is great, it lets you write Javascript that has access to your Google Apps, like email, docs, etc. You can do stuff like send emails as a result of changes in your Docs, or in my case, run a script every day that reads your email and writes to a spreadsheet.

Here's how the script works, although there's definitely room for improvement. Every day it runs, it looks at my last 30 days of email, and for every email where I responded to someone else it adds up the delay between their email and my response. Additionally (and here's the kind of weird part that I think is creating the spikes in the above graph) I wanted to keep track of my outstanding responses and how long they were taking. My normal email workflow is that I keep things that I need to respond to in my inbox, so I decided to include for any email in my inbox, the time between the last email (as long as it wasn't from me) and the current date.

One final caveat was that, after 60 days I put a hard cutoff, since those are typically emails I just never respond to, and finally archive in shame.

So how does it look? For most (median) of my emails I respond in a few hours. But for the 99th%ile email, it is much worse, around 25 days, and even worse if you go back a month or so.

I definitely recommend Google Apps Script. It's easy, but super powerful because all of the useful data (i.e., yours) that the scripts have access to. I could even see it being a pretty good way to learn programming/JavaScript, since from day 1 you can do some pretty interesting things.