Skip to content

Instantly share code, notes, and snippets.

View davemulford's full-sized avatar

Dave Mulford davemulford

  • Red Hat
  • Dallas, TX
View GitHub Profile
@davemulford
davemulford / netceptor.mmd
Last active October 7, 2025 17:49
Mermaid of receptor dependencies
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davemulford
davemulford / migrate-git.repos.sh
Created November 18, 2024 15:01
Generates a script to recreate all git repos from a parent directory. Assumes an "origin" remote exists in each repo.
# Taken from the following post but saved here for ease of access.
# https://dev.to/douglaslise/how-to-migrate-all-your-git-repositores-to-a-new-computer-2c72
dirs=$(find . -name '.git' -type d | sed 's/\/\.git//')
for dir in $dirs; do
GIT_DIR=$dir/.git
# Creates the folder structure
echo mkdir -p $dir;

Karabiner layouts for symbols and navigation

Gavin Sinclair, January 2022

Introduction

I use Karabiner (configured with Gosu) to make advanced key mappings on my Apple computer. Karabiner allows you to create “layers”, perhaps simulating those on a programmable mechanical keyboard. I make good use of these layers to give me easy access (home-row or nearby) to all symbols and navigational controls, and even a numpad.

The motivation is to keep hand movement to a minimum. Decades of coding on standard keyboards has unfortunately left me with hand and wrist pain. I will soon enough own a small split keyboard which will force me to use layers to access symbols etc., so this Karabiner solution, which has evolved over months, is a training run for that.

@davemulford
davemulford / gist:cb6040e7dad9c3a930fa441581dc761f
Created January 28, 2022 21:44
Superset postgresql TEIID cancelation token error
[SupersetError(message="TEIID30068 The function 'pg_backend_pid()' is an unknown form. Check that the function name and number of arguments is correct.\nDETAIL: org.teiid.jdbc.TeiidSQLException: TEIID30068 The function 'pg_backend_pid()' is an unknown form. Check that the function name and number of arguments is correct.\n", error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 'Issue 1002 - The database returned an unexpected error.'}]})]
Traceback (most recent call last):
File "/app/superset/views/base.py", line 205, in wraps
return f(self, *args, **kwargs)
File "/app/superset/utils/log.py", line 242, in wrapper
value = f(*args, **kwargs)
File "/app/superset/views/core.py", line 2476, in sql_json
command_result: CommandResult = command.run()
File "/app/superset/sqllab/command.py", line 104, in run
raise ex
@davemulford
davemulford / gist:b9fdf09d377601bb460df138cd89dda1
Created April 28, 2021 16:35
For github.com/containers/podman issue opened
# docker run --rm -ti docker.io/busybox:latest id
uid=0(root) gid=0(root) groups=10(wheel)
# docker events --since 1m | grep die
2021-04-28T16:01:40.478507485Z container die f984eb4db7c81442850e7a1e4ac2bd2d80f23ff233fd078cc24589fbd9c9f215 (exitCode=0, image=docker.io/busybox:latest, name=dreamy_carson)
# curl -s --unix-socket /var/run/docker.sock "http://v1.40/version" | python3 -m json.tool
{
"Platform": {
"Name": "Docker Engine - Community"

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: