123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- +++
- +++
-
- :source-highlighter: pygments
- :source-language: console
-
- == Linux
-
- === Dotfiles
-
- I store my dotfiles in Git so I can easily keep track of
- changes and sync them between devices.
-
- To do so I create a bare git repository in my home directory,
- and configure it to not show untracked files:
-
- [source]
- ----
- $ cd $HOME
- $ git init --bare $HOME/.dotfiles
- $ git --git-dir=$HOME/.dotfiles config --local status.showUntrackedFiles no
- ----
-
- I then have the following in my `.bash_aliases` to make it easier to
- interact with when I want to perform git operations:
-
- [source,bash]
- ----
- # dotfiles
- alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
- ----
-
- Some of my dotfiles have API keys and other semi-sensitive bits and bobs,
- so I encrypt the entire repository with
- https://github.com/spwhitton/git-remote-gcrypt[git-remote-gcrypt].
-
- === Random commands
-
- Split some pages from a PDF::
- [source]
- ----
- $ pdftk myoldfile.pdf cat 1 2 4 5 output mynewfile.pdf
- ----
- Resizing disks::
- [source]
- ----
- $ fdisk # delete and recreate the partition
- $ resize2fs # resize to the new partition
- ----
- Adjust IO priority::
- [source]
- ----
- $ iotop -c 3 pid # -c 3 is "when idle"
- ----
- Take a screenshot of an area::
- [source]
- ----
- $ scrot -s output.png
- ----
-
- === Alpine
-
- https://www.alpinelinux.org/[Alpine] is a lightweight linux distribution that
- uses musl libc and busybox. It is often used in docker images due to its
- relatively small footprint.
-
- ==== Notes
-
- * The equivalent of Ubuntu's `build-essential` is `build-base`
|