Minor annoyances while installing GitLab

I’ve installed GitLab on my server, and it hasn’t exactly been a smooth ride. So here goes, what went wrong in my case — and how to fix it. First off, I should mention the server is a LXC container running Debian 9 (Stretch) 64bits. Prerequisites install failures Following along the GitLab install guide, the […]

$TERM issues with tmux and vim

tmux 2.1 is out (well it’s been out for a few months now), and brings with it a shiny new terminfo file: tmux-256color. Unfortunately, switching my $TERM from screen-256color to tmux-256color inside tmux doesn’t work as expected: when starting Vim, … nothing happens. It just sits there, not showing up Vim, not giving me back […]

chroot rm-ing disaster recovery

So you’re setting up your chroot, mounting or bind-mounting important parts of your filesystem (commonly /dev, /sys, /proc), you do some work, and then you realize you missed something and you have to start over. No biggie, it’s just a chroot, let’s … rm -rf /path/to/chroot it. But you forgot to unmount mounts in the […]

On restrictive firewalls and SSH+X

So I had to set up a firewall for a box at work. The firewall should only allow inbound SSH connections from specific IPs within the LAN, and outbound connections to the LAN. Ok. Well easy peasy, I get my nice iptables script courtesy of Dan Robbins, alter the default policy for the OUTPUT chain […]

Leveraging Intel Ivy Bridge’s hardware RNG

Intel Ivy Bridge CPUs such as the i7-3770K that I own ship with a hardware random number generator that can be polled through the RdRand instruction. This feature is advertised in /proc/cpuinfo with the rdrand flag. This hardware RNG can be leveraged to increase the entropy bits available to Linux’s random character devices /dev/random and […]

Burning CDs from the command line

I needed to burn some files to a CD recently and had to go through some searching and trial-and-error before finding the right tools and options, so here goes what I turned out to use, for future reference: to build the ISO: mkisofs -o <image.iso> -V <volume-label> -l -J -joliet-long -R <directory> This enables the […]

Sweatless –help text

I just stumbled upon a nice way to generate the --help text from the comments at the top of the file. Here’s how it’s done in hub‘s build script: #!/usr/bin/env bash # Usage: script/build [-o output] [test] # # Sets up GOPATH and compiles hub. With `test`, runs tests instead. #[blah] case "$1" in #[blah] […]

Precision audio ripping with abcde

I was recently offered a pair of AKG K702 cans, and decided to make sure my audio sources were up to par. This prompted me to re-encode parts of my audio library using the lossless FLAC encoding, as opposed to WMA/MP3 192kbps earlier. I thus needed a ripper/encoder, and decided to go for abcde: $ […]