I keep my dotfiles organize in a git repository using StreakyCobra’s method

To initialize a new dotfile repository use the following:

git init --bare $HOME/.dotfiles
alias cfg='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
cfg cfg --local status.showUntrackedFiles no
echo "alias cfg='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

Now you can access dotfiles git commands from anywhere with:

cfg status
cfg add .vimrc -f
cfg commit -m 'Add vimrc'
cfg push

To restore the dotfiles to a new machine:

git clone --bare <git-repo-url> $HOME/.dotfiles
alias cfg='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
cfg checkout


Watch files for changes


We can see the output being written to a file by using the tail command.

tail -f log/development.log


We can use guard to monitor source code files and compile them when we save the file.

To install it we can use gem:

gem install guard
gem install guard-shell
guard init shell

Then you can edit the Guardfile to filter the files we want to check and perform any action we want. As an example, the following will check haskell files and compile them on save:

guard :shell do
    watch /.*\.l?hs$/ do |m|
        `runghc #{m[0]}`


Peat is an utility created by Steve Losh, and only depends on Python being installed. You can pipe any command to peat and it will start watching them. If it detects any changes, the argument of peat will be executed:

find . -name hello.c | peat "make hello && ./hello"


In Linux, we can use inotify to watch for system changes and act accordingly. In this script you can watch all directories in the current path and execute whatever you pass it as an argument:

# Depends on 'inotify-tools' package
FORMAT=$(echo -e "\033[1;33m%w%f\033[0m written")
while inotifywait -qre close_write --format "$FORMAT" .

Converting images for web performance

I like to rescale and bitcrush images for using on the web to reduce their size. You can always keep a high resolution image available for when you click on them. ImageMagick to the rescue!

convert src_img.jpg -resize 800 -dither FloydSteinberg -depth 3 -colors 5 dst_img.png

Transfering files using tar

We can use tar to copy files between different machines with ssh access without using rsync or scp:

ssh hostname tar -C sources/ -cz linux | pv | tar -xzv

Source: gemini://

Essential UNIX packages

Some packages necesary for a normal installation using my workflow, should be applicable for Linux, FreeBSD and macOS.

Development tools

Programming languages

Linux specific


Network analysis

Web browsers