Skip to content

Instantly share code, notes, and snippets.

// Based on https://gist.github.com/halmartin/28e013a9034be04777073bccc918cb95 (python)
// And uses Crc32 and Base32 from other github code
// Code should run on .NET Framework 4.7+
using System.Security.Cryptography;
// The 3 constants is byte definitions inside the library mentioned in the original code
// These should be HEX encoded to strings without leading 0x, i.e. "0d0a" etc.
const string AES_IV = "";// This is one of the values you need to dig out of the library;
const string HMAC_KEY = "";// This is one of the values you need to dig out of the library
const string HMAC_MSG_RAW = "";// This is one of the values you need to dig out of the library
tcp:
routers:
rou_dot:
entryPoints:
- dot
rule: HostSNI(`my.dot.domain.here`)
service: svc_dot
tls:
certResolver: le
services:
@dekimsey
dekimsey / ipmi-updater.py
Last active April 9, 2024 15:30 — forked from mcdamo/ipmi-updater.py
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@maelvls
maelvls / README.md
Last active April 22, 2025 08:50
Ubuntu, libsecret, git-credential-helper

Dealing with secrets

GNOME comes with libsecret. You can use libsecret to store your git credentials:

sudo apt install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
@x3rAx
x3rAx / # Shellrc.d #.md
Last active April 27, 2024 12:47
Setup instructions for `~/.shellrc.d/`

Shellrc.d

Setup

Create the directory ~/.shellrc.d

mkdir ~/.shellrc.d

@x3rAx
x3rAx / # SSH-Agent.md
Last active April 27, 2024 12:47
SSH Agent

Note:

Replace @ with / in filenames.

Set up your .bashrc to use .shellrc.d.

Make sure ssh-agent, ps and awk are installed and that $USER is set to your username.

@TheTechromancer
TheTechromancer / dhcp_option_121.py
Created November 9, 2019 22:16
DHCP Option 121 (Routes) with Python 3 for pfSense, etc.
#!/usr/bin/env python3
from ipaddress import *
routes = [
# destination # router
('10.0.0.0/24', '172.16.0.2'),
('0.0.0.0/0', '172.16.0.1')
]
@thecatontheflat
thecatontheflat / .docker-private-registry-with-read-write-control.md
Created June 10, 2019 15:19
Run docker private registry with read/write access control
@JamesHagerman
JamesHagerman / HowToHostapd.md
Last active April 7, 2024 12:50
Just some notes on getting wlan0->eth0 configured with hostapd and dnsmasq to turn a box into a router.

How to setup hostapd based router

Install some tools you'll need with: apt-get install -y hostapd dnsmasq wireless-tools iw wvdial

Note that some wifi cards just plain don't work with hostapd. Sorry.

Setup your network interfaces correctly

This is done in /etc/network/interfaces: