There’s columns you’ll want to query from your database. However, third party integrations (like Stripe or PayPal), in particular, might urge you NOT to add a column to your database, depending on your setup. Let’s state the obvious: a basic User class will most likely have an email column. You’ll be querying this often as a SaaS for customers. A database column makes complete sense is common sense. A good rule of thumb to add a database column when working with third parties is if you’ll be querying them often.
A common scenario working on a new feature is to recklessly code and pray it all works. Often times, this MIGHT work. Sometimes, shit hit the fan. Here’s a Vim/Tmux/Git trick to view changes and incrementally add code to debug your problems.. all on a single screen. 1. Open three panes in Tmux: Vim and two terminal shells. You’ll want a pane to edit code, another to see diffs and the other to run a stash.
You’ll want to do yourself a favor before making major rebases from master to your feature branch. Save your latest SHA Jot down the sha of your latest commit. This has saved my ass several times. You’ll avoid sifting through the dreaded reflog trying to figure out where you fucked up. Execute a git log and copy the SHA to your notes. Use git reset –hard <your_sha> to go back to that state.
Utilizing Git’s ideas of branches and Jekyll or Hugo blogging services, we can create simple deployment workflows with Github’s free hosting. Shout out to Codegangsta for inspiring this post. My blog is powered by Hugo, below is my setup deploying a fresh Hugo repo to Github Pages. We’ll assume Hugo is installed correctly and you generated a local hugo repo. Setup an empty Github repo following the convention: <your_handle>.github.io. Hugo to Github Pages > cd ~/Code/hugo_repo > git init >git:(master) echo ‘public’ >> .gitignore # Git will ignore your public folder.