Skip to content

Instantly share code, notes, and snippets.

@andrewnk
andrewnk / README.md
Last active March 17, 2023 16:40
Create an Ubuntu Focal Cloud-init Template on Proxmox

Get a shell into the proxmox server. Change VM_STORAGE to the location where to store your clout-init and disk image (e.g. local, local-zfs, etc.).

export VM_ID="$VM_ID"
export VM_STORAGE="freenas"

qm create $VM_ID --name "ubuntu-focal-cloudinit" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
qm importdisk $VM_ID focal-server-cloudimg-amd64.img $VM_STORAGE

qm set $VM_ID --scsihw virtio-scsi-pci --scsi0 $VM_STORAGE:$VM_ID/vm-$VM_ID-disk-0.raw
@andrewnk
andrewnk / gist:ecba8448b5009eaa3ae1433c549d881d
Created July 20, 2021 01:01
Resize partition in alpine
# after the virtual disk has already been expanded (e.g. in proxmox)
apk add --no-cache cfdisk e2fsprogs-extra
# choose partition then "Resize" > "Write" (to finalize)
cfdisk
# replace * with partition you are resizing
resize2fs /dev/*
@andrewnk
andrewnk / tmux.sh
Created May 11, 2019 19:20
tmux build for non root user on alpine
#!/bin/sh
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in ${HOME}/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.9a

Keybase proof

I hereby claim:

  • I am andrewnk on github.
  • I am andrewnk (https://keybase.io/andrewnk) on keybase.
  • I have a public key ASDILxbhE9D6fXu2JyXgcP2TJjnj6dFQtTbovpvc_EEc0Ao

To claim this, I am signing this object:

@andrewnk
andrewnk / Dockerfile
Created August 14, 2018 18:24
Veldspar Megaminer
# docker build -t megaminer .
# docker run -it megaminer megaminer --address <your wallet address> --threads 16
FROM alpine
RUN apk update && \
apk add --no-cache git gcc g++
RUN git clone https://github.com/VeldsparCrypto/megaminer.git