Cleaning up docker cruft

Here’s a quick tip I discovered recently:

I was tired of having complex shell commands to look at docker’s dead containers and unused images. Happily, new versions (API v1.25 onwards) have simple equivalents:

docker system prune
docker container prune
docker network prune
docker volume prune

Here’s a link to the documentation.

Code exploration in C with GNU GLOBAL

For a long time I’ve been getting by with using cscope at work. I’m not a great C programmer by any stretch, and I need to have multiple windows open and a note book by my side to get any sort of understanding of the code.

globals
GLOBAL’s HTML output

So I was happy to discover GNU GLOBAL recently. Getting it setup is a matter of running gtags on the root of the repository. Running htags also produces nice HTML files that make it much easier to browse through.

It has quite a few integrations as well. The snippet I added to my emacs init.el is as follows:

;; gtags/gnu globals
(setq load-path (cons "/usr/share/emacs/site-lisp/" load-path))
(autoload 'gtags-mode "gtags" "" t)
(setq c-mode-hook
 '(lambda ()
 (gtags-mode 1)
 ))
(setq gtags-suggested-key-mapping t)
(setq gtags-auto-update t)

Here is a table that compares similar tools.