Things I keep Needing to Look Up

October 5, 2019   

This will be a post I keep updating as it keeps track of things I keep forgetting

Git

See a git commit log that is nice and neat, including what stage remotes and branches are at.

git log --oneline --decorate

Linux

To compress a folder (create, verbose, compress, files) with full file path

tar -cvzf folder.tar.gz /path/to/folder

To skip the subfolders

tar -cvzf folder.tar.gz --directory=/path/to folder

Then extract them with

tar -xvf folder.tar.gz

To look at the amount of storage that all home directories take up

sudo du -d 1 -ch /home/

ggplot

To change the angle of labels on an axis

library(ggplot2)
ggplot(iris, aes(x = Species, y = Petal.Length)) + 
  geom_boxplot() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))