I love learning and in the past few weeks, I've learned so much!! In lieu of a more organized post on this stuff, here’s a random smattering of what I’ve learned the last few weeks.Ls –lM
lists everything in list formGit rebase –i sha
is what you use in order to squash commitsGit rebase master
… I’m still learning the process and exactly how to troubleshoot this but it seems standard in worksflows that require pull requests and it’s pretty interesting to solve merge conflicts.
Debugging (with capybara): insert a save_and_open_page
to see what page/path opens
Alfred workflows are amazing. I’m trying to train myself to use my mouse less. My wonderful mentor suggested that instead of going cold turkey on the mouse, I should start by getting good at just a few things. So, I’m starting with Alfred workflows and trying to get better at not using my mouse within my text editor (sublime).
Alfred workflows that I have set up include spotify, dash, and being able to search for any file or folder on my computer. I’ve got the git workflow partially set up.
In Sublime text, one of the most useful things I’ve learned recently is CMD + .
will switch back and forth between the test file and file being tested. CMD T allows you to type to open a file. Just to name a few.
Option and highlight lets you highlight the first letter of each lineGit commit
(without –m, etc.) will open your text editor so you can do the commit message there, save it, close it and it’ll bring you back to the command line and finish the commitGit checkout –
brings you back to the last branch you were onGit rebase –i HEAD ~1
rolls back 1 commit (~2 rolls back 2 commits)
From the command line putting touch
and then the path with the filename at the end will create that file
When squashing commits (which means making multiple commits into one commit), you always ‘s’ (squash) the second one
Gem railroady produces a UML diagram of your code structure
Kill process… somehow I created a connection with a server and then I created a second connection with a server and then couldn’t get one of those connections to close! ps aux | grep <thing you’re looking for, in this case thin>
finds the process so you can see if it’s running (I’ve since used this ps aux | grep ruby
and ps aux | grep puma
)
Then kill -9 prodID
(number all the way to the left) kills it. Alternatively, you can also kill it by doing killall -9 thin
(or whatever you’re trying to kill)
18-Mar-2014 by Allison McMillan Read Time: Approx. 2 minutes