Great Looking LaTeX Tables

No colour No vertical gridlines No fills No borders No bolding Left align text Right align numbers Align titles with data Resize columns to data Use consistent precision

My Favourite LaTeX Packages

Stop LaTeX Floats and Figures from Appearing in References Section

Convert Images in a Directory

A simple bash for-loop for convert many images at once.

Count the Number of Files in a Directory

ls -l | wc -l ls: list directory contents -l: list in long format wc: word, line, character, and byte count -l: the number of lines is written to the standard output This command counts the number of listed lines. I find this most useful when I want to quickly see how many logs or records have been generated by a process.

Count the Number of Words in a LaTeX Document

detex my-document.tex | wc -w detex: a filter to strip TeX commands from a .tex file wc: word, line, character, and byte count -w: The number of words in each input file is written to the standard output

Recursively Git Reset All Submodules

git submodule foreach --recursive git reset --hard This command recursively resets all submodules in a git project. This is especially useful for projects with submodules (and maybe even submodules within submodules) when you want to reset your working copy to a completely clean state.

Start a Simple Web Server

python -m http.server 8000 This will serve index.html in the current working directory.

How to Trigger a Travis CI Build Without Admin Privileges

Sometimes Travis CI builds fail due to sporadic timeouts, network errors, etc. While these non-code errors can be quite annoying, Travis CI has a handy Restart build for when these situations occur, but only users with admin privileges have access to this feature.