Skip to content

Instantly share code, notes, and snippets.

@seanb4t
seanb4t / 01-multus-k3s.md
Created December 9, 2021 01:04 — forked from janeczku/01-multus-k3s.md
Multus CNI with k3s and RKE

Using Multus CNI in K3S

By default, K3S will run with flannel as the CNI and use custom directories to store CNI plugin binaries and config files(You can inspect the kubelet args K3S uses via journalctl -u k3s|grep cni-conf-dir). So you need to configure that properly When deploying Multus CNI.

For example given the official Multus manifests in https://github.com/intel/multus-cni/blob/36f2fd64e0965e639a0f1d17ab754f0130951aba/images/multus-daemonset.yml, the following changes are needed:

volumes:
 - name: cni
@seanb4t
seanb4t / create-cloud-template.sh
Last active May 25, 2021 00:12 — forked from chriswayg/create-cloud-template.sh
Proxmox Cloud Init Template Creation
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@seanb4t
seanb4t / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active April 8, 2021 19:02 — forked from XSystem252/RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@seanb4t
seanb4t / how-to-restore.md
Created August 6, 2020 12:55 — forked from AmazingTurtle/how-to-restore.md
restore access to unifi controller

Restore access to a unifi controller

When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.

Warning

Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.

Steps

@seanb4t
seanb4t / keybase.md
Created July 8, 2020 12:05
Keybase Proof

Keybase proof

I hereby claim:

  • I am seanb4t on github.
  • I am seanbrandt (https://keybase.io/seanbrandt) on keybase.
  • I have a public key whose fingerprint is AB4B F010 3CFD F76F B0C4 2304 0A5C 6C7B 591E D2C8

To claim this, I am signing this object:

@seanb4t
seanb4t / .git_hooks_pre-commit
Created April 16, 2016 21:14 — forked from leucos/.git_hooks_pre-commit
ansible-vault pre-commit hook
#!/bin/sh
#
# Pre-commit hook that verifies if all files containing 'vault' in the name
# are encrypted.
# If not, commit will fail with an error message
#
# Original author: @ralovely
# https://www.reinteractive.net/posts/167-ansible-real-life-good-practices
#
# File should be .git/hooks/pre-commit and executable

Keybase proof

I hereby claim:

  • I am sean-brandt on github.
  • I am seanbrandt (https://keybase.io/seanbrandt) on keybase.
  • I have a public key whose fingerprint is AB4B F010 3CFD F76F B0C4 2304 0A5C 6C7B 591E D2C8

To claim this, I am signing this object:

@seanb4t
seanb4t / install_homebrew.rb
Created July 27, 2011 00:28 — forked from mxcl/install_homebrew.markdown
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
#!/usr/bin/ruby
#
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
#
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
# versions of OS X. I cannot verify that for sure, and it was tested on
/**
*
* @author Sean Brandt [sean@bwcgroup.com]
*/
import org.slf4j.LoggerFactory
trait Logging {
lazy val log = LoggerFactory.getLogger(getClass)
import ctypes, base64, pickle, sqlite3, os, re
is_windows = True
try:
# try to get Windows path first
SHGetFolderPath = ctypes.windll.shell32.SHGetFolderPathW
except AttributeError:
is_windows = False
if is_windows:
from ctypes.wintypes import HWND, HANDLE, DWORD, LPCWSTR, MAX_PATH