Skip to content

Instantly share code, notes, and snippets.

🤓
Trying to exit emacs

Brian Gordon briangordon

🤓
Trying to exit emacs
View GitHub Profile
View README.md

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 google.com. 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
briangordon / nginx.conf
Last active May 15, 2020
My personal nginx configuration for sharing files
View nginx.conf
# Copyright 2020 Google LLC.
# SPDX-License-Identifier: Apache-2.0
worker_processes 4;
events {
use epoll;
}
http {
View markets discussion.md

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
briangordon / chrome.json
Created Feb 2, 2020
Jess Frazelle's Google Chrome seccomp profile combined with the default docker profile
View chrome.json
{
"defaultAction": "SCMP_ACT_ERRNO",
"syscalls": [
{
"name": "accept",
"action": "SCMP_ACT_ALLOW",
"args": null
},
{
"name": "accept4",
@briangordon
briangordon / cisco-sg350 switch1
Last active May 2, 2020
Switch configuration
View cisco-sg350 switch1
config-file-header
switch1
v2.5.0.90 / RTESLA2.5_930_364_105
CLI v1.0
file SSD indicator encrypted
@
ssd-control-start
ssd config
ssd file passphrase control unrestricted
no ssd file integrity control
@briangordon
briangordon / SNAKE.8xp
Created Oct 3, 2019
Source code for a TI-BASIC implementation of Snake
View SNAKE.8xp
{11,5,11,5,11,5→L₁
1→𝒏:dim(L₁)→L
1→S:0→T
0→C:1→P
0→W
DelVar [A]
{10,26→dim([A]
ClrHome
While 1
If P
@briangordon
briangordon / office-privacy.reg
Created May 27, 2019
Microsoft recently introduced "required" telemetry for Office which cannot be disabled through the UI. This should shut it off.
View office-privacy.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\office\common\clienttelemetry]
"sendtelemetry"=dword:00000003
@briangordon
briangordon / gitgraph-react.sh
Last active Mar 29, 2019
Steps to build gitgraph-react to play with the storybook 😵
View gitgraph-react.sh
brew install node
export PATH="$HOME/.node/bin:$PATH"
npm install -g lerna
git clone git@github.com:nicoespeon/gitgraph.js.git
echo "scripts-prepend-node-path=true" >> gitgraph.js/.npmrc
cd gitgraph.js
yarn
cd packages/gitgraph-core
yarn
cd ../gitgraph-react
@briangordon
briangordon / gitgraphjs.html
Created Mar 28, 2019
gitgraphjs.com (https://web.archive.org/web/20181222070223/http://gitgraphjs.com/) 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.
View gitgraphjs.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/domready/1.0.8/ready.js"></script>
<script type="text/javascript">
domready(function() {
var gitgraph = new GitGraph({
template: "blackarrow",
@briangordon
briangordon / make-letters.sh
Created Mar 4, 2019
Shell script to make letter icons for Slack
View make-letters.sh
mkdir letters
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:A letters/a.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:B letters/b.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:C letters/c.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:D letters/d.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:E letters/e.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:F letters/f.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:G letters/g.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:H letters/h.png
convert -background transparent -fill black -font Chalkduster -pointsize 72 label:I letters/i.png
You can’t perform that action at this time.