Category Archive: tips

Jan 28

Cloudera Manager, Embedded DB and Docker

If you ever see a message like:

on startup and the Cloudera manager won’t start, it’s because you did not start the container in privileged mode:

Oct 09

Mounting Partitions from Image Files on Linux

I’ve been working with disk images from the excellent crew from Hypriot and there are times when I wish to mount the filesystems within to inspect and or make alterations to them. Since there are multiple filesystems, it’s not like mounting an ISO image — there’s more work which needs to be done. Being a …

Continue reading »

Oct 08

Solving File Filtering Problems with this One Weird Trick

One Weird Trick

I was asked an interesting question — how to create a regular expression which would allow a user to specify an arbitrary case insensitive series of strings, all of which must be on a line, as well as a series of strings which must not be on a line in order to filter logs. In …

Continue reading »

Oct 06

Ruby Enumerables ‘with_index’

Ruby’s Enumerable module provides a couple of methods for stepping through an enumerable with the index of the element as well. However, a couple are missing — there is no inject_with_index or map_with_index. There are a couple of ways of remedying this.

Continue reading »

Sep 18

OBS for Videos

I recently discovered a really interesting tool for producing videos of screen captures, optionally with webcam inserts. It’s called Open Broadcaster Software and it works on Linux, Windows, and there is a beta version for Apple OSX. It seems that it was originally intended for streaming to websites, but it has a lot more features …

Continue reading »

Sep 07

Bulk Adding Hosts to a Pi Swarm

I’ve refreshed my stack and am rebuilding the cluster. I’m using Hypriot for the linux distribution, but I’m a smart sysadmin (read lazy) and don’t want to manually add them each time. Also, I want to make a script so that I can quickly rebuild. This is inspired by Let Docker Swarm all over your …

Continue reading »

Sep 07

Getting the Docker Swarm Discovery Token

At the moment, docker swarm doesn’t have a self-discovery method. If you’ve mislaid or forgotten the discovery token you can’t add new elements. It just so happens that if you do a docker inspect $SWARM_AGENT_MASTER, the token will show up in the command line arguments.

Continue reading »

Sep 07

Viewing Raspberry Pi Config Variables and More

Sometimes it’s helpful to see if a particular parameter is set or not on the raspberry pi. This is where vcgencmd. However, vcgencmd is useful for many other things.

Continue reading »

Apr 09

Abusing Awk

Almost ashamed to admit I did this, yet it’s still kinda cool. I use awk for a lot of commandline parsing; I learned it back in 1989…. before perl was much of a thing. For some problems, awk “just works”. So I was wanting to count the number of instances of ‘A’ in a collection …

Continue reading »

Mar 23

Shrinking Docker Images

Size does matter. Docker images can become quite large as each RUN generates a new layer which becomes part of the image, even if it’s not in the final container. This wastes disk space and network bandwidth. The following are some steps for shrinking the size of a docker container in which builds have been …

Continue reading »

Older posts «