Skip to content

Instantly share code, notes, and snippets.

@dm0-
dm0- / test-ipsec.sh
Created March 10, 2017 00:28
Test IPSec between two containers
#!/bin/bash -ex
# Test IPSec with a tunnel between two containers.
# Provide /proc/net/pfkey since af_key.ko apparently isn't autoloaded.
sudo modprobe af_key
# Start and prepare the containers.
for host in left right
do
docker run \
@dm0-
dm0- / coreos-docker-update.sh
Last active April 6, 2020 17:12
Update Docker on CoreOS using torcx
#!/bin/bash -e
# Select which Docker version to use on CoreOS with torcx.
# Specify the available Docker version to enable.
version=17.09
# Create modifiable torcx paths if they don't exist already.
mkdir -p /etc/torcx/profiles /var/lib/torcx/store
# Download the torcx manifest file for the currently running OS version.
@dm0-
dm0- / README.md
Last active December 7, 2018 14:33
Automated Tectonic installer for local virtual machines

Tectonic virtual install script

This script is a Tectonic installer for local development and testing. It creates a cluster of virtual machines on the same host that runs the script. All files, processes, and any other virtual resources that are created during its execution should be automatically removed on exit.

Dependencies

The first lines in the script list every command dependency, which can be

@dm0-
dm0- / notes.md
Created December 20, 2023 21:51
Notes on using Fedora to cross-compile Rust projects

Cross-compile Rust on Fedora

These notes will set up a cross-compiling environment for Rust projects using only prebuilt Fedora RPMs with no emulation. While this works, it is unsupported and will leave the system RPM database in an odd state that could result in packages getting out of sync. It should only be used as a temporary measure if at all.

The example commands use aarch64 as the target architecure.

Install a cross-compiling environment for GNU C