Skip to content

Instantly share code, notes, and snippets.

@joshenders
joshenders / flatcar_incus_setup.md
Last active February 24, 2024 02:42
Flatcar Container Linux UEFI Setup Under Incus on Debian

Flatcar Container Linux Setup Under Incus on Debian

In case you missed it, Canonical relicensed LXD under AGPLv3 in December 2023 with a mandatory CLA. The LXD project was hard forked as Incus and licensed under an Apache 2.0 License.

Incus is maintained by the same team of developers that first created LXD and is recommended for new users going forward.

Install and configure

Borrowed from here.

@joshenders
joshenders / openwrt_lxd_multiwan.md
Last active February 11, 2024 10:07
OpenWrt 23.05.x Setup Under LXD 5.x on Debian 12 with PCI Passthrough

OpenWrt 23.05.x Setup Under LXD 5.x on Debian 12 with PCI Passthrough

In case you missed it, Canonical relicensed LXD under AGPLv3 in December 2023 with a mandatory CLA. The LXD project was hard forked as Incus and licensed under an Apache 2.0 License.

Incus is maintained by the same team of developers that first created LXD and is recommended for new users going forward.

If you continue with this guide using Incus, substitute incus for lxc in each command.

Install lxd via snap and configure

💡 If using Debian 12 (Bookworm) or newer, you can just apt install lxd but keep in mind this pacakge is EOL and new users are encouraged to move to Incus.

@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@oleduc
oleduc / isolate-cpus.sh
Last active February 16, 2024 10:09
CPU isolation bash script for KVM QEMU VFIO gpu passthrough for virtual machine performance optimizations using libvirt-hooks and cgroups
#!/bin/bash
# Cores reserved for the host machine
# Must include QEMU IO/Emulation cores if configured
# Ex: 1st Core -> reserved=0
# Ex: 1st & 2nt Cores -> reserved=0,1
# Ex: 1st Physical Core (16 Virtual Cores) -> reserved=0,8
reserved=0,8
# Host core range numbered from 0 to core count - 1
@blackjack4494
blackjack4494 / readme.md
Last active February 28, 2024 12:47
Add SSL Certificate to Unifi Controller using Acme.sh and DNS verification
@tomdaley92
tomdaley92 / README.md
Last active March 27, 2024 18:51
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@zcutlip
zcutlip / lldb-hand-rolled-headers.md
Last active January 25, 2021 13:38
Importing Hand-Rolled C Header Files in LLDB

Importing Hand-Rolled C Header Files in LLDB

Scenario

  • We're debugging a dylib, libhello.dylib
  • The dylib is linked from hello
  • The exported function is helloworld()
  • We do not have source, but have reversed a struct from the library and created a hand-crafted header file

Header File

@tuxfight3r
tuxfight3r / s3_upload.sh
Last active March 27, 2024 08:42
AWS - Upload files to S3 via curl
#!/bin/bash -x
#Date: 21/7/2017
#Author: Mohan
#Purpose: To upload files to AWS S3 via Curl
#Uploads file at the top level folder by default
#S3 parameters
S3KEY="XXXXXXXXXXX"
S3SECRET="XXXXXXXXXXXXXXXX"
@ntamvl
ntamvl / ubuntu-16-increase-maximum-file-open-limit-ulimit-n.md
Last active July 26, 2021 10:06
Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

If you are setting up nginx,chances are you will discover your worker_connections is at some low number, such as 1024. You can’t increase this number unless you increase kernel limit as well. First of all run cat /proc/sys/fs/file-max to discover your maximum limit.

abc@ubuntu:~$ cat /proc/sys/fs/file-max
1048576
abc@ubuntu:~$ ulimit -n
1024
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active March 13, 2024 15:08
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda