Adam Lamers

Senior Software Engineer specializing in Security, Compliance, and Identity at scale.

Recent Writing

All posts →

Execute .sql file with PyMySQL

Most SQL files contain interpreter commands such as DELIMITER that make passing the commands through to pymysql somewhat difficult, this code snippet allows you to separate out the statements in the sql file into a list for sequential execution.

Bash Locate (flocate)

A fast locate-like tool that you can carry with you in your dotfiles, that only uses basic binaries available on most systems. Searches through a compressed database of file locations on your hard drive.

Pretty JSON streams

I've been looking at walls of JSON for the last few days, and realized that I really shouldn't be doing that. So I made a script that will continuously indent and output a stream of JSON data formatted and indented properly.