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 […]

pkg-config chaining

Quick note: chaining pkg-config .pc files using the Requires: statement works. As in, flags from the required packages are indeed added to the flags for the requiring package, including -L flags (which I was wondering about in particular, w.r.t. PR Itseez/opencv#3792). This might seem obvious as that’s quite the purpose of this statement, but I […]

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] […]

Emerge blocker: =net-analyzer/openvas-7.0.6

After a Portage tree sync, OpenVAS was to be upgraded to version 7.0.6 (having ACCEPT_KEYWORDS ~amd64). Unfortunately, this somehow triggered Portage into belching out a lot of blocker errors. Even after unmerging all OpenVAS packages to start over from a clean state, Portage still wanted me to install the following: $ eix -e openvas * […]

Re-parenting widgets with Tk’s [pack]

Just a short post about re-parenting widgets in Tcl/Tk, using the [pack] geometry manager. Short because the solution is simple (and documented), but I couldn’t find it easily since I did not correctly understand the problem I was having. So, I wanted to move a widget .frame.widget packed in a frame .frame into a sub-frame […]

WiFi on Gentoo using a RTL8192CU wireless adapter

I’m trying to set up a wifi network interface on my Gentoo box, using a Realtek RTL8192CU wireless adapter. After poking in the kernel configuration menu, I activated the following items: Networking support > Wireless (CONFIG_WIRELESS) Networking support > Wireless > cfg80211 – wireless configuration API (CONFIG_CFG80211) Networking support > Wireless > enable powersave by […]

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: $ […]

Un-bricking Debian: apt-get crash in non-critical packages

I’ve got an old Asus Eee netbook that I run Debian on, since as much as I love Gentoo, I wouldn’t want to compile anything on that Atom N280 – and I’m too lazy to setup distcc. Unfortunately, the beast tends to fall victim to chronic MCEs, almost systematically in the course of apt-get operation. […]