Skip to content

Instantly share code, notes, and snippets.

View vbatts's full-sized avatar
🧁

Vincent Batts vbatts

🧁
View GitHub Profile
@vbatts
vbatts / main.go
Last active December 19, 2022 20:50
terrible instagram export HTML
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"sort"
"strings"
"time"
@vbatts
vbatts / gateway-prep.sh
Last active March 9, 2022 12:00
things for using Azure Gateway
#!/bin/bash
set -eu
conf_zip=""
if [ -f kv0.zip ] ; then
conf_zip="kv0.zip"
fi
if [ -f kv1.zip ] ; then
conf_zip="kv1.zip"
@vbatts
vbatts / main.go
Created September 2, 2021 16:28
dumb simple access to the on-disk gentoo pkg database
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
@vbatts
vbatts / Makefile
Last active June 2, 2021 15:28
Build https://launchpad.net/~smoser/+archive/ubuntu/swtpm for ubuntu-20.10 with the python scripts included
IMAGE := ubuntu:20.10
CWD := $(shell pwd)
NAME := $(shell git config user.name)
EMAIL := $(shell git config user.email)
SWTPM_URL := https://github.com/stefanberger/swtpm
build: build.sh output
docker run \
@vbatts
vbatts / cloud-config.yaml
Last active August 15, 2024 20:05
flatcar+k3s cloud-init
#cloud-config
coreos:
units:
- name: install-opt-dir.service
content: |
[Unit]
Description=Install /opt directories
ConditionPathIsDirectory=!/opt/libexec
ConditionPathIsDirectory=!/opt/libexec.wd
@vbatts
vbatts / Makefile
Last active June 3, 2022 16:07
Makefile for running flatcar qemu images locally
# Vincent Batts <[email protected]> 2020-09
CWD := $(shell pwd)
SSH_KEY ?= $(shell realpath $$HOME/.ssh/authorized_keys)
HOST_NAME ?= flatcar-local.test.lan
ISO_FILE = $(CWD)/$(HOST_NAME).iso
MEMORY ?= 4096
PORT ?= 2223
CHANNEL ?= stable
BOARD ?= amd64-usr
@vbatts
vbatts / .toolboxrc
Created August 25, 2020 17:46
Decent settings for Flatcar's `toolbox`
TOOLBOX_DOCKER_IMAGE=debian
TOOLBOX_ENV=" --bind-ro=/run/torcx/unpack/docker/bin/docker:/usr/bin/docker --setenv=DOCKER_HOST=unix:///media/root/var/run/docker.sock --setenv=SSH_AUTH_SOCK=/media/root/${SSH_AUTH_SOCK} "
@vbatts
vbatts / cloud-config.yaml
Created August 13, 2020 21:48
cloud-config for crun+docker on flatcar
#cloud-config
coreos:
units:
- name: docker.service
command: start
drop-ins:
- name: 50-crun-runtime.conf
content: |
[Service]
@vbatts
vbatts / flatcar.sh
Created June 24, 2020 21:27
run a local flatcar VM for testing
#!/bin/sh
set -eu
curl -LO https://www.flatcar-linux.org/security/image-signing-key/Flatcar_Image_Signing_Key.asc
gpg --import Flatcar_Image_Signing_Key.asc
wget \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu_image.img.bz2 \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu.sh \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu.README \
@vbatts
vbatts / build-wireguard.sh
Created June 16, 2020 15:28
building kernel module on flatcar
#!/bin/bash
# more information on building kernel modules https://docs.flatcar-linux.org/os/kernel-modules/
set -ue
. /etc/os-release
. /etc/flatcar/update.conf
rm -f flatcar_developer_container.bin.bz2.DIGESTS ||:
wget "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_BOARD}/${VERSION}/flatcar_developer_container.bin.bz2.DIGESTS"