Skip to content

Instantly share code, notes, and snippets.

View webmasterOVN50's full-sized avatar
💭
I may be slow to respond.

Michael Adams webmasterOVN50

💭
I may be slow to respond.
View GitHub Profile
@elejke
elejke / install-conda.sh
Last active April 12, 2025 07:20 — forked from arose13/install-conda.sh
Install Miniforge (Minimal conda installation) in Ubuntu arm64 / aarch64
# Setup Ubuntu
sudo apt update --yes
sudo apt upgrade --yes
# Get Miniforge and make it the main Python interpreter
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh -O ~/miniforge.sh
bash ~/miniforge.sh -b -p ~/miniforge
rm ~/miniforge.sh
echo "PATH=$PATH:$HOME/miniforge/bin" >> .bashrc
@madalinignisca
madalinignisca / cloud-init.sh
Last active July 19, 2022 18:26
WordPress on MicroK8s
#!/bin/bash
set -euo pipefail
USERNAME=wpk8s # TODO: Customize the sudo non-root username here
# Create user and immediately expire password to force a change on login
useradd --create-home --shell "/bin/bash" --groups sudo "${USERNAME}"
passwd --delete "${USERNAME}"
chage --lastday 0 "${USERNAME}"
@derekmahar
derekmahar / install_nix_in_an_incus_container.md
Last active September 17, 2025 19:02
How to Install Nix in an LXD Container

How to Install Nix in an LXD Container

Steps to install the Nix package manager inside an Ubuntu 24.04 Incus container using the images:ubuntu/noble image:

  1. On the Incus host, create an Ubuntu 24.04 container:
    lxc init images:ubuntu/noble container1
    
  2. On the Incus host, enable nested security on the container:
@dhcgn
dhcgn / gist:44965387e581dfc893f6bb0f568b233d
Last active June 8, 2023 14:04
ipfs.service on ubuntu
wget https://dist.ipfs.io/ipfs-update/v1.5.2/ipfs-update_v1.5.2_linux-amd64.tar.gz
tar -zxvf ipfs-update_v1.5.2_linux-amd64.tar.gz
cd ipfs-update/
sudo sh ./install.sh
ipfs-update install latest
ipfs init --profile server
ipfs key gen --type=ed25519 --size=256 tools
wget https://download.sysinternals.com/files/SysinternalsSuite.zip
unzip SysinternalsSuite.zip -d SysinternalsSuite
@berndbausch
berndbausch / LXD-cheat-sheet.md
Last active October 12, 2025 09:13
LXD cheat sheet

Useful LXD commands

Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.

Interestingly, the LXD command line client is named.... lxc!

List available containers

lxc image list ubuntu:        # ubuntu: is officially supported image source
lxc image list images:        # images: is an unsupported source
lxc image alias list images:  # lists user-friendly names
@zparnold
zparnold / one_liner.sh
Last active September 16, 2025 13:54
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@guoyoujin
guoyoujin / install cfssl
Last active February 19, 2025 19:06
linux install cfssl
source:
https://pkg.cfssl.org/
install:
$ curl -s -L -o /bin/cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64
$ curl -s -L -o /bin/cfssljson https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64
$ curl -s -L -o /bin/cfssl-certinfo https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64
$ chmod +x /bin/cfssl*
@maxivak
maxivak / readme.md
Last active November 21, 2022 21:16
Multiple networks in LXC container

Network for LXC container

Host device as bridge

  • persisted in host's /etc/network/interfaces the container's veth virtual ethernet interface can share the network link on the physical interface of the host (eth0). So the container resides on the same ethernet segment and talks to the same dhcp server as the host does.

Additonal bridge device

  • setup manually with brctl
@CalebEverett
CalebEverett / events-websock.js
Last active March 29, 2023 15:04
Lxd api example: lxc exec and operations websocket via nodejs
const fs = require('fs')
const WebSocket = require('ws');
const wsoptions = {
cert: fs.readFileSync('../../.config/lxc/client.crt'),
key: fs.readFileSync('../../.config/lxc/client.key'),
rejectUnauthorized: false
}
var ws = new WebSocket('wss://127.0.0.1:8443/1.0/events?type=operation', wsoptions);