Ben Formosa's blog

A blog about my work in devops and software.


Sticky notes and cheat sheets

Category: blog
Tags: organisation, notekeeping

Even though I am a very strong proponent of a paper-free workflow, I keep a number of physical sticky notes and cheatsheets around my desk at work. These are usually quick reminders of useful things I use infrequently.

Useful commands

Vim

C-w H
Vertical split
C-w K
Horizontal split
:w !sudo tee %
Save as root

Git

git diff --color-words=.
Highlight changed characters, instead of whole lines
git pull --rebase
Pull in ff commits without having to do a merge commit

Bash

C-x C-e
Edit current command

Misc

openssl x509 -in <CERT> -noout -text
View a digital certificate

Create MediaWiki Table from csv

This one isn't on a sticky note yet, but I wanted to record it somewhere. I'm constantly using Tables Generator when working on the wiki, but who knows where it's sending my data. Requires python-tabulate

python -m tabulate -1 -f mediawiki /path/to/input/file | tr -s '[:blank:]' | sed 's/ \([|!]\)/\n\1/g' | sed 's/\([|!]\)\+/\1/g'

Cheat Sheets

Advice to myself

It's not DNS
There's no way it's DNS
It was DNS

SSBroski