Skip to content

Instantly share code, notes, and snippets.

@juddgaddie
juddgaddie / wg-speedy.sh
Created June 7, 2020 17:42
Setting up wireguard in a specific VRF and adding a route. Works with Cumulus Linux
#!/bin/bash
#to enable debugging
#echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control
ip rule add fwmark 1001 iif lo priority 4999 table mgmt
ip link add dev wg0 type wireguard
ip -4 address add 10.1.50.43/16 dev wg0
wg setconf wg0 <(wg-quick strip /etc/wireguard/wg0.conf)
wg set wg0 fwmark 1001
@juddgaddie
juddgaddie / UnsafeBuffer.cs
Created April 26, 2019 15:52
Unsafe buffer with Bounds Checking
/*
* Copyright 2014 - 2017 Adaptive Financial Consulting Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
### Keybase proof
I hereby claim:
* I am juddgaddie on github.
* I am juddgaddie (https://keybase.io/juddgaddie) on keybase.
* I have a public key ASABSLFMAqEuJB8y9b5rl_9Tk8-Rmcq7gwDOGmNJrhECIAo
To claim this, I am signing this object: