Skip to content

Instantly share code, notes, and snippets.

briangordon /
Last active March 11, 2021 04:33
ddclient for Cloudflare DNS / DO

This is a ddclient setup for updating Cloudflare DNS from a DO droplet.

You do get one free floating IP which makes dynamic DNS pointless, but you'll get charged if you want to turn off the droplet. Running ddclient lets you keep using Cloudflare DNS without manually updating your A records.

Debian Buster (current stable) only has ddclient 3.8.3 which has trouble with the v4 Cloudflare API, so we get ddclient from GitHub.

apt install perl libdata-validate-ip-perl libjson-any-perl
tar xzf ddclient-3.9.1.tar.gz
cp ddclient/ddclient /usr/sbin/

These are the configuration files I ended up using for setting up a Wireguard-based anonymizing VPN on Debian Buster (the current stable), formatted as a shell script. It requires the Wireguard kernel module and userland tools from backports: apt-get install -t buster-backports wireguard-tools

The idea here is to set up a network namespace containing the configuration for the wireguard interface wg0. Any program which wants to use the Wireguard interface needs to be run in that namespace. For example, ip netns exec wireguard ping All sockets opened by that program and its children will go out over the tunnel, including DNS resolution, so they won't be able to interact in any way with the local network. Conversely, other processes (which were not started with ip-netns) will continue to use the original routing tables and DNS configuration, so things like SSH, remote desktop, and NFS

briangordon / ludi-nginx.conf
Last active March 11, 2021 04:54
My personal nginx configuration for sharing files
user www-data;
worker_processes auto;
pid /run/;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
# Mine. Probably not necessary but why not

Session 1: Preliminaries

  • Bid/ask spread
    • Stock quotes
    • Measure of liquidity
    • Steady state (order book, market depth, types of orders)
    • How prices move
  • Market makers
    • NYSE vs NASDAQ vs crypto
  • Advantages given in exchange for risk
briangordon / chrome.json
Created February 2, 2020 06:53
Jess Frazelle's Google Chrome seccomp profile combined with the default docker profile
"defaultAction": "SCMP_ACT_ERRNO",
"syscalls": [
"name": "accept",
"action": "SCMP_ACT_ALLOW",
"args": null
"name": "accept4",
briangordon / cisco-sg350 switch1
Last active May 2, 2020 16:05
Switch configuration
v2.5.0.90 / RTESLA2.5_930_364_105
CLI v1.0
file SSD indicator encrypted
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
briangordon / SNAKE.8xp
Created October 3, 2019 05:51
Source code for a TI-BASIC implementation of Snake
DelVar [A]
While 1
If P
briangordon / office-privacy.reg
Created May 27, 2019 02:27
Microsoft recently introduced "required" telemetry for Office which cannot be disabled through the UI. This should shut it off.
Windows Registry Editor Version 5.00
briangordon /
Last active March 29, 2019 15:58
Steps to build gitgraph-react to play with the storybook 😵
brew install node
export PATH="$HOME/.node/bin:$PATH"
npm install -g lerna
git clone
echo "scripts-prepend-node-path=true" >> gitgraph.js/.npmrc
cd gitgraph.js
cd packages/gitgraph-core
cd ../gitgraph-react
briangordon / gitgraphjs.html
Created March 28, 2019 05:32 ( gives you the building blocks to start working with the JS version but leaves you to put it together. Here's a fully working example to get it running.
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="" />
<script src=""></script>
<script src=""></script>
<script type="text/javascript">
domready(function() {
var gitgraph = new GitGraph({
template: "blackarrow",