Over the years I’ve collected an array of one-off scripts, shell aliases, git subcommands, etc., and I often find myself wanting to reference or edit of one of them. Sometimes I know where to look, but not always, and when in doubt I rely on the which command to point me in the right direction. wvim is a script that I’ve built to streamline these sort of edits. It started as a simple wrapper…
Recently I was looking to upgrade the Postgres version on an application I’ve been working on. This would require a small amount of downtime, likely about 10 minutes. The default solution I’d reach for in these cases would be to go into Heroku’s maintenance mode, which serves an HTML maintenance page with a 503 Service Unavailable status code. This works but makes the application entirely unusable…
SQL window functions are one of those topics that never quite clicked for me in the abstract, but I’ve been able to take advantage of them on a few recent projects and wanted to share some of what I’ve learned. As context for this particular example, I’ve been in the habit of weighing myself daily for the past ~11 years. Aside from providing a very interesting data set, it just ends up being a lot…
I often find myself wanting to make similar edits to a set of files within a project. More than I can do with sed , but simple enough that ag + vim are the perfect tools for the job. In the age-old tradition of using blog posts as notes to one’s future self (and any other kind soul who happens to need the same pile of hacks I stumbled upon), here we are. Further below is an explanation of the…
Announcement post for my recent thoughtbot investment time project - Tell Me When It Closes. Get notified when something closes on GitHub without getting lost in noisy discussions.
Join me as thoughtbot CTO Joe Ferris drops some serious knowledge about ActiveRecord and database querying in general. I learned a ton recording this one.
Announcement for my tmux course on Upcase. A deep dive into the configurations, workflows, and thinking that I and my fellow 'bots use to get the most out of tmux.
Recently I have been working on increasingly complex Rails apps and have been looking for a way to better handle deploying them. That being said, these are apps that only a handful of people are using and are all hosted on Heroku. The following is the recipe I have pulled together to take the deployment of these apps a bit more seriously while not making it too complilcated. Think $ git push…
This post is a collection of the notes for a talk I gave on March 19th for the Boston Vim meetup . The talk covered my approach to learning Vim over the long haul, and some tactics for learning Vim in a more continuous way. Experimenting Vim Config Know Your Leader Plugin Management Using Git Learning The Help System Inspiration Bit by Bit Incremental Features Search Registers Macros Global…
Vim has a great completion system, capable of intelligently supporting a whole range of filetypes, and overall is a great piece of the vim picture. The key feature that I was hoping to find was the ability to trigger completion and move through the list of completion options using a single key combo, preferably on the home row. What follows is my current method for doing this. What You Get Ctrl-j…
I will be taking a few flights in the coming weeks and I wanted to arrange to have access to the documentation for some of the tools and frameworks I have been using. I searched around a bit and found a suggestion at the bottom of this thread that explained how to do this with a single shell command. Big win! The relevant command was: wget -rkp http://api.rubyonrails.org/ This command uses wget to…
Command-T is a vim plugin for rapid file navigation using fuzzy path matching. It is one of the few plugins I find truly essential. Although profoundly useful, I find that there are a few customizations that make it unbeatable. In order to make Command-T a little more friendly, I do the following: Make all Command-T actions relative the current git repo root Use the .gitignore to filter the file…
Please pardon the cliché title, but I had to start somewhere. This is my new personal site and blog. I expect it to mostly track my coding work, but I am open to seeing where it goes. In general I find that explaining or teaching seems to be a good way for me to sort out what I think about various topics, so most posts will most likely be me explaining something to a slightly younger version of…