Skip to content

Instantly share code, notes, and snippets.

View mitch000001's full-sized avatar
🔌
Working from home

Michael Wagner mitch000001

🔌
Working from home
View GitHub Profile
@nealfennimore
nealfennimore / wireguard.conf
Last active September 25, 2024 19:58
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
[Unit]
Description=Tunnel TCP traffic to WireGuard
After=network.target
[email protected]
[Service]
Type=simple
ExecStart=/usr/bin/udptunnel -s 443 127.0.0.1/51820
Restart=on-failure
@Ryanb58
Ryanb58 / install.md
Last active October 4, 2024 11:11
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active November 18, 2024 19:08
Byte formatting for Google Sheets
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 28, 2024 20:51
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@nicolai86
nicolai86 / main.go
Last active December 25, 2016 17:14
zipkin ES response percentiles
package main
import (
"flag"
"fmt"
"os"
"sort"
"time"
"github.com/gonum/plot"
@FelicianoTech
FelicianoTech / newer-go-on-circle-example.txt
Created November 14, 2016 21:52
An example of how to use Go versions newer than v1.6.2 on CircleCI.
machine:
environment:
GODIST: "go1.7.3.linux-amd64.tar.gz"
post:
- mkdir -p downloads
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
@nicolai86
nicolai86 / Dockerfile
Last active October 11, 2016 17:43
golang plugins /w `net/rpc` & docker
FROM scratch
ADD my-plugin /
ENTRYPOINT ["/my-plugin"]
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 18, 2024 13:32
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096

Hello,

Peter Bourgon recently announced his proposal for a working group of 4-6 individuals to address the need for an official dependency management solution for Go. With the imminent release of Go 1.7 and the commencement of the next development cycle, the formation of this working group should be a high priority item.

I would like to be nominated to be part of this working group and seek your support. In doing so I wish to make clear my position that, if nominated, I would represent to the working group:

  • Simple. The solution must be simple in both implementation and use. It should do no more than the absolute minimum required to satisfy the requirements for a tool, and those requirements should be expressed as user stories for the various users of a Go dependency management tool.
  • Opinionated. The solution will recommend and support only one way to use it. There will be an absolute