Be Careful Using tmux and Environment Variables
tmux has an interesting quirk in the way it handles environment variables that if you’re not careful can cause some seemingly strange behavior.
Fortunately, this behavior is documented but in my opinion, is not intuitive. From the tmux man page:
The Five Ws of a Git Commit
Your commit history is not for you, at least not for you of right now. You of right now are full of context and understanding that despite how much we may convince ourselves that we’ll remember with perfect clarity tomorrow, I rarely find that to be the case. To solve this problem it’s important to approach our commit history like a story.
Fun With sqlite-utils
sqlite-utils has a fun feature that allows you to easily create sql schema from json or csv.
Use CDPATH for Faster Navigation
CDPATH is an environment variable that allows you to cd into directors that may not be in your current working directory. It can be useful to add commonly used directions, ~/code for example, to allow you to quickly change directory without having to type out the full path.
Change Default git Branch
First we’ll need to rename the old branch to the new branch. For this we’ll be renaming the master branch to main.
Branch Agnostic Git Aliases
Github and others have recently changed the name of the default branch in git
from master
to main
, you can read more about the change here. If you
are like me you likely had a few git aliases that were hard coded to assume the
default branch in a repository was master
, however there is a better way of
writing git aliases that will work no matter what the default is set to.
Signing Git Commits With Keybase
Signing your commits is a good practice that applies your John Hancock to your work so that others can verify that it was really you made the change, plus you get a cool Verified badge on GitHub and who doesn’t like badges. Managing private keys can be a tricky process but fortunately keybase greatly simplifies this and allows us to easily share keys between different machines.
A Tale of Two Pipes
Let me first introduce you to two leading characters: STDIN and STDOUT
Install homebrew to your home directory
NOTE: This method of installation is no longer supported but I will leave the post here for posterity. The issues that this was meant to solve have since been fixed by homebrew. You can visit the homebrew website for current installation instructions.
How to not leak your credentials to the internet
This was shameless stolen from the one and only Brian Hatfield
Sharing your dotfiles on the internet can have a lot of advantages but can become a huge pain if you’re not careful.
Elixir ExUnit.DocTest
Have you ever been frustrated by the lack working examples in documentation? Elixir helps solve this problem with a built in feature called DocTest.