code


Momentary

Momentary is an Android keyboard with one function: entering today’s date. I find myself entering today’s date multiple times a day when I’m using my phone. Under normal circumstances this is a pain to type. 2016-05-25, for example, is at least 10 clicks, and this is even worse if you’re relying on long presses. Momentary to the rescue! When you select Momentary as the input method, it enters today’s date and immediately returns to the previous input method.

Tags: android code

Read more...

Vim and LaTeX

LaTeX is the de facto standard tool for writing academic papers. When working with groups I generally find myself using Share LaTeX . Share LaTeX is a great way to collaborate Google Docs-style one a LaTeX document, and it has a very forgiving compiler that in general seems to get things right. As is the case with so many other things, however: editing LaTeX is better with Vim.


Read more...

Dropbox-Style Photo Importing

For a long time I’ve used Dropbox for my photo imports. I now have a pretty complicated system for how I store them, but something I liked about Dropbox was that it imported photos with file names like 2016-04-18 14.10.47.jpg. To me this is a much easier way to think about photos than the default serialized version used by the camera, and it hides the ugly file names that differ across screenshots taken on my phone, photos uploaded by my phone, and photos manually imported from my different cameras.

Tags: code

Read more...

Backing up Files with md5sum

When I have a directory I am going to be moving around a lot I use the following command to find all files, create checksums, sort in a file, and write to a file: find . -type f -exec md5sum "{}" + | sort -k 2 \ >2016-04-18_photos2016-03_md5sums_barbet1tbB.chk This should sit at the top level of the folder you are dealing with. I back up my photos month by month, for instance, and I keep one with each of my yyyy-mm style directories.

Tags: code

Read more...

Switching to vim-plug

When I first picked up vim I dealt with plugin functionality by hand. I have no idea how I did this, as doing it manually now seems insane. No doubt it was because I didn’t have many plugins. I soon switched to Pathogen . For quite a while after that I was using Vundle . Vundle was working well, thanks to a very easy Plugin 'user/repo' syntax in my vimrc that made plugins painless.


Read more...

Scaling Favicons

When I redid my site to use Hugo I also redid my favicon . I wanted this favicon to also serve as the Add to Home Screen functionality provided by Chrome . I expected Chrome to automatically scale up the favicon. When I designed it I made it pixelated on purpose, so some very crude scaling was just what I wanted. Unfortunately Chrome doesn’t scale automatically, so my add to home screen icon was just a blue square with a white S set in the center.

Tags: code python web

Read more...