More Fun with 'git filter-branch'

Previously, I covered the use of the git filter-branch for removing large media assets from a repository’s history. Recently I had a new opportunity to perform this task on whole directories. Here is the command sequence I used to clean up the repo history and to shrink the pack file: # Remove a directory from history in all branches and tags $ git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch path/to/dir' --tag-name-filter cat -- --all # Shrink the local pack $ rm -Rf ....

2014-04-01 · 1 min · 188 words · Nathaniel Hoag

Switch to Prezto and vim-airline

I’ve been using Oh-My-Zsh and Powerline for vim for a while now, but just recently converted to Prezto and vim-airline, repectively, on word of the usability and performance improvements. Already, the benefits have been well worth the minimal effort required to set these up. Note: anecdotally, the original switch from bash to zsh was quite easy - I understandably hear questions about this often. With Prezto, two improvements stand out markedly:...

2014-03-23 · 2 min · 232 words · Nathaniel Hoag

Snapshot: My Git Usage

Following are the Git commands and Git family of tools that I use in my day-to-day. Before writing this post, I generated a report of my most-used git sub-commands with the following: history | awk '$2 == "git" {print $3}' | sort | uniq -c | sort -nr | head -n 20 Most of my Git usage is bread-and-butter Git commands, but I’ll highlight some of my favorite Git features below....

2014-03-15 · 4 min · 681 words · Nathaniel Hoag

SSL Acrobatics

I flip a lot of websites around between servers, and often haven to migrate SSL certificates as part of the process. The below openssl commands represent most of what I encounter in terms of validations and encoding conversions. Primer First, a couple of basics on certificate components. The four SSL components to know are the Certificate Signing Request (CSR), the key, the certificate, and the Certificate Authority (CA) intermediate certificates. When starting fresh, you’ll first generate a CSR and a key....

2014-01-28 · 3 min · 555 words · Nathaniel Hoag

Another Hodgepodge Update

Recently, a bash script that I’ve used many times on lots of different types of servers was giving very strange results. Typically the script is called as ./script.sh info.cfg and proceeds to run through several processes. On this occasion, I was left with : command not found. When I hit the script with bash -x I could see that both the script and the config file were giving strange results and choking on line-breaks and curly braces....

2013-12-29 · 2 min · 425 words · Nathaniel Hoag