Skip to content

Instantly share code, notes, and snippets.

bmaupin /
Last active Feb 19, 2021
Docker container exposure to network
Method Docker iptables setting Firewall on? Exposed to local network
docker run --network=host -p 3306:3306 false No Yes
docker run --network=host -p 3306:3306 false Yes No
docker run -p 3306:3306 Default Yes ⚠️ Yes
docker run -p Default Yes No

An alternative option would be to leave the Docker iptables as the default, leave the firewall on, and modify iptables itself à la

bmaupin /
Last active Mar 16, 2021
Use NSUI via Wine
bmaupin /
Last active Oct 9, 2020
Make TP-Link TL-WR841N a wireless range extender

Using the stock firmware

  1. Connect to the primary router and set the 2.4 GHz network to a specific channel
    • The channels must be the same for WDS to work
  2. Connect to the router using a network cable
  3. If you're running OpenWrt, you'll need to flash the stock firmware
    1. Download the latest firmware for your hardware version from TP-Link's website
    2. Strip the stock firmware using dd; see the steps here:
    3. Flash the stock firmware from LUCI
  4. Browse to the stock firmware web interface (
bmaupin /
Created Oct 3, 2020
Never Alone texture fix
# See:
sudo apt install gcc-multilib libgl1-mesa-dev libgl1-mesa-dev:i386 pkg-config
curl > ~/.local/share/Steam/steamapps/common/NeverAlone/neveralonefix.c
# Then set game launch options to: sh neveralonefix.c %command%
# (
  • gzipped binary file
    • 12 byte gzip "extra field" set
      • Not sure how important this is or what it contains. It doesn't appear to be related to the version of the game.
      • Subfield ID 1 (SI1) is always: C (0x43)
      • Subfield ID 2 (SI2) is always: T (0x54)
      • Data:
        • Sample 1: 0x8C 2A 00 00 07 35 01 00
          • .bkp file: 0x78 2A 00 00 C7 34 01 00
        • Sample 2: 0x44 30 00 00 CD 56 01 00
          • .bkp file: 0x40 30 00 00 CD 56 01 00
bmaupin /
Created May 29, 2020
extundelete "no such file or directory while creating directory"

This error may occur when using extundelete with -o:

extundelete: No such file or directory while creating directory

The problem is that -o expects a relative path to the current directory (not an absolute path). Either use -o with a relative path or remove -o.


bmaupin /
Last active Feb 11, 2021
Install Oracle client on Ubuntu 18.04


  1. Decide which version of the Oracle client to install

  2. Download the Oracle client packages

bmaupin /
Last active Mar 19, 2021
Convert OpenShift DeploymentConfig to Kubernetes Deployment
  1. Change apiVersion from:

    - apiVersion: v1

    (or apiVersion:


bmaupin /
Last active Oct 1, 2019
Using buildah inside a RHEL container


  • Unlike Docker, buildah doesn't need root privileges to run
  • Buildah can pass yum entitlements from build container to container being built
    • Since this has to be done manually (see /run/secrets:/run/secrets below) couldn't Docker do this as well?


  1. Make sure you're using a RHEL host registered with yum

  2. Make sure you're using RHEL build container image, such as:

bmaupin /
Last active Oct 1, 2019
Parse OpenShift logs in Graylog


  • Application logs are mixed with kubernetes logs. They can be searched using a query similar to this one, but it's a bit unwieldy as it's not using Graylog fields (for example, the quotes can't be left out): "container_name=mycontainer"

  • The actual log message is prefixed with a bunch of extra information that makes the logs difficult to read in the Graylog UI. For example, the message in Graylog shows up as: output_tag: namespace_name=mynamespace, container_name=myapplication, pod_name=myapplication-7dd79c7bb7-qkfzk, message=Web server listening at:

    But the actual log message is: