Skip to content

Instantly share code, notes, and snippets.

View darth-veitcher's full-sized avatar

James Veitch darth-veitcher

View GitHub Profile
@darth-veitcher
darth-veitcher / README.md
Created February 23, 2022 15:06 — forked from djjudas21/README.md
MicroK8s, Ingress and MetalLB

Ingress MetalLB

Out of the box, the MicroK8s distribution of ingress-nginx installed as the MicroK8s addon ingress binds to ports 80+443 on the node's IP address using a hostPort, as we can see here:

microk8s kubectl -n ingress describe daemonset.apps/nginx-ingress-microk8s-controller
Name:           nginx-ingress-microk8s-controller
Selector:       name=nginx-ingress-microk8s
@darth-veitcher
darth-veitcher / HowTo
Created February 23, 2022 11:32 — forked from whoisxiang/HowTo
Ubuntu 20.04.3 AutoInstall
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
wget https://ubuntu.volia.net/ubuntu-releases/20.04.3/ubuntu-20.04.3-live-server-amd64.iso
# Create ISO distribution dirrectory:
@darth-veitcher
darth-veitcher / gist:0753253a748a4d519d09f3fd6433100f
Created October 20, 2021 13:53 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@darth-veitcher
darth-veitcher / ssh.config
Created October 20, 2021 07:50
SSH config for onion hidden service
# Uses a local proxy on port :9050 so assumes you are
# running Tor to expose this to SSH.
host myservice.onion
hostname 2fxcweuibfeuibgiownedoiewnfu3wfnwcin7imiad.onion
user myuser
port 22
identityfile ~/.ssh/id_rsa
ProxyCommand /usr/bin/nc -xlocalhost:9050 -X5 %h %p
@darth-veitcher
darth-veitcher / check_throttle.sh
Created October 13, 2021 10:15
Check for throttling on RaspberryPi
#!/bin/bash
# This bash script outputs the status of your Pi and checks whether you are being throttled for undervoltage and gives you your temperature
# Article and discussion at https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/
# Author James A Chambers 6-6-17
# Output current configuration
vcgencmd get_config int | egrep "(arm|core|gpu|sdram)_freq|over_volt"
# Measure clock speeds
for src in arm core h264 isp v3d; do echo -e "$src:\t$(vcgencmd measure_clock $src)"; done
@darth-veitcher
darth-veitcher / gizmoscribe.css
Created October 9, 2021 15:32 — forked from johnnygizmo/gizmoscribe.css
BattleScribe Replacement CSS Version 1
/*
This file is based off the CSS output of the BattleScribe App. This is only meant to pretty up the output a little
Instructions:
1: Create a folder for your rosters
2: Place this file (gizmoscribe.css) in the folder
3: Place a png image file (make sure it's square) with your army logo in the same folder and call it logo.png
4: Save your rosters in HTML format to the folder
5: Edit the HTML files in a text Editor of choice (notepad, notepad++, etc)
@darth-veitcher
darth-veitcher / lockfile-pattern.sh
Created September 10, 2021 08:36
Using a lock file in a bash script
# Check is Lock File exists, if not create it and set trap on exit
if { set -C; 2>/dev/null >${LOCK_FILE}; }; then
trap "rm -f ${LOCK_FILE}" EXIT
else
echo "Lock file exists at ${LOCK_FILE}… exiting"
exit
fi
@darth-veitcher
darth-veitcher / wireguard-over-tcp.md
Created August 31, 2021 13:15
WireGuard over TCP with udptunnel

WireGuard over TCP with udptunnel

udptunnel is a small program which can tunnel UDP packets bi-directionally over a TCP connection. Its primary purpose (and original motivation) is to allow multi-media conferences to traverse a firewall which allows only outgoing TCP connections.

Server

# udptunnel -s 443 127.0.0.1/51820

Client

@darth-veitcher
darth-veitcher / open-gis-datasets.md
Last active July 7, 2021 14:02
UK Government Open GIS Datasets

Open GIS Datasets

Collection of useful links (primarily UIK focused) for publicly available GIS datasets.

Ordnance Survey

OS OpenData

Contains links, including API details for:

  • Basemaps (with WMTS and ZXY endpoints)
  • Addressing data
@darth-veitcher
darth-veitcher / auth.go
Created July 4, 2021 13:53 — forked from ogazitt/auth.go
Auth0 PKCE flow for a CLI built in golang
package auth
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"