Tech Resources

January 30th 2017

I'm updating this piece because I still think it's a good idea that you know about these basics. I'm wondering what other tech fundamentals you want to know about that I can help you with. Let me know.

  • Git Aliases

Git aliases are great once you have the Git fundamentals down.

If you already know what git pull origin master is and you spend all day typing that into your command line, you know how much faster it'll be to write

% gpom


TJ Holowaychuk wrote the guide to doing this. Watch his 9 minute screencast on aliases, you might find it nutrient rich. A faster, smoother Git workflow leads to a more focused day on the command line.

  • Clopen

Here's one of the bad code habits I had the hardest time breaking. Remembering to close what's opened while coding.

When you open


Close it with


When you open


close with


How to break this habit?

Easy. When you open a bracket, close it. Only then do you use the backarrow key to write what goes into the now opened and closed brackets.



rather than




Of course this means backarrowing more than you might want, and doing so is annoying. What is more annoying is openings with no closings that throw up an error at compile time.

Everything that opens must be closed (unless it's a self-closing tag, obviously).

Save this

syntax on

in your .vimrc folder, in the off chance you forget. If you want to just try syntax highlighting in vim, hit escape, then

:syntax on

Either way, a visual reminder to close what you've opened.

  • Command Line Essentials

If you were switching off an Apple operating system and onto a Linux machine, what commands would you want to know first?

--message received from someone reading

My response: If I were switching off an Apple machine and onto a Linux machine for the first time today, here's what I'd want to know.

The command line things I'd want to know

Where the command line is located

If I didn't know where the command line was, the first thing I'd want to do is find it. Since I'm on a Linux box right now, I don't know how to unfind it. I rarely work on anything other than the command line. Last week when I was doing a big archive purge I used gnome to run through photo deletion fast, but soon as I wrapped that project up I got back to dwm (tiling window manager).

  1. First few UNIX commands







In order from top to bottom

  1. make directory to make a new folder

  2. change directories

  3. list what's in a directory

  4. copy one thing over another (use with care -- better to use 'mv' then delete the original)

  5. move one thing to another place

  6. print working directory to know where you are in the file structure

  7. tree

I'd want to know about that.

du -h


du -sh


Let's you know where you are, how your files look and how much more there is to delete.

  • Concatenate

    % cat index.html

does what you'd think (cats the file, reads and then outputs the contents of the file you just cat'd to standard output), but did you know


is (probably) the oldest UNIX utility. And it's derived from


which is itself connected to


which means to connect one thing to another.

  • Mosh

My internet connection is inconsistent, so when I'm using mutt, say, to check email, say, over SSH I'll be mid-way through responding to a message when the connection drops. Or, I'm using Profanity (an XMPP-based chat client) and don't know whether the message I sent was received, nor whether I've received the whole message that was sent this direction. That was the pain point. While reviewing Git reset docs, I ran across a developer who linked to another developer who'd written a piece on Mosh.

With mosh, I know when the connection lags because it alerts me to the fact. I also know when a message has been sent over the UDP connection and when it has not (while I'm typing and it's not yet sent, the words are underlined; once sent, the underlines disappear). It's not all that different than SSH in terms of usability, and to start using it it's

mosh username at

the same way you'd log into your server.

Upon entering the mobile shell, things look the same as SSHing in, and

tmux attach

reconnects you to an always-live Profanity session (if you do indeed have an always-live XMPP-based chat session, and if you detach correctly, with...

ctrl b


For those of us already on Arch, mosh is a

sudo pacman -Syu mosh


  • Vim

how do I cd into Writing? what does cd mean?

-- question received via

$ cd

means change directory. Quick command line crash course with your UNIXy essentials.

cd change directory
cd .. go back one level
ls list contents of a directory. That and $ pwd will tell you where you are
mkdir make directory
rm -rf delete everything in a directory (use with care)
cp copy. You do

$ cp [filename] to [new location you want the file to go]

Best to use

$ mv

instead and delete the original once you've moved it to its new location. Delete is permanent, it's not a trashcan icon from which you can recover later.

Edit something and now hit escape and then


to save the updates

Then hit enter.

Then do

git add layouts/index.jade

to add the file name, then

git commit -m

to add a commit message


git push origin master

on local


git pull origin master


Then a

$ npm run build

and reload your site to see updates.

Updated: 2019-06-18 to tighten, 2019-07-29 to clean up

Algos Anonymous→

← 21 Guidelines for Year of the Engineer

email · 2019