Skip to content

Mastering Tmux

Tmux has been one of the best things I’ve added to my developer toolkit. After my initial dive into tmux, I’ve slowly learned more about the system and made some additional improvements to my workflow. Some notes from my tmux learnings over the last couple years: It’s been great that tmux continues to get consistent updates. Mad props to the developer who has maintained this tool for quite a long time without too much funding. In recent versions of tmux, you don’t need reattach-to-user-namespace but you do need to remap default keybindings to use pbcopy. From my research, it wasn’t clear that you still needed to modify your config to use pbcopy, but you definitely do…

Continue Reading

Supercharged Zsh Command History

I’m a big fan of incrementally improving your terminal productivity. I invested in learning tmux a while back and it’s been a game-changer for me in terms of flying through terminal workflows (which is especially important for me since I’m heavily REPL-driven). I’ve wanted to improve my terminal history functionality for a while now and recently found the time to tune up this part of my dev workflow! Fzf-based Shell History I’ve been using fzf based completion for years and it’s awesome. It’s easy to install so if you want something better than the default, this is a great place to start. Removing Entries from ZSH History If you update HISTORY_IGNORE your existing history is not retroactively filtered…

Continue Reading

Fast, Local, Written-by-you Code Search

I work with many disparate open-source repos in many different programming languages. I often encounter a problem that I know I’ve solved before, but I can’t remember where I solved it. When I worked at Stripe, we had livegrep. It searched all of the repositories across Stripe in real-time. GitHub has an awesome code search tool now too. I love code search: often, it’s easier to "grep the internet" for obscure usage examples than asking ChatGPT or Google. However, what was missing was a code search tool I could quickly run on the command line to search through local Git repositories that were mostly written by me…

Continue Reading

How to Inject Custom Code on Python Interpreter Startup

Ruby and Javascript both allow you to execute arbitrary code before your main application runs without modifying your application code. My most common use case is executing monkey patches to make it easier to debug an application. However, this is not possible with Python. This makes using development tools like pretty-traceback challenging. In my case, I work across a bunch of reports, and injecting six lines of Python into each repo is annoying (especially since many open-source repos don’t have a concept of a PYTHON_ENV, so there’s not an easy way to disable it in prod). The Magic .pth File In any engineering discipline, the more you understand the entire stack you are working with, the faster you’ll be able to fix issues…

Continue Reading