- I am on Mac OS X arm64
- I have 1 USB flash drive, not 2 (easy to write live USB installer to one and install to the other)
- I do not have a Windows or Linux PC near by (can't format NTFS without pain, can't format ext4 without pain, etc.)
- I want to prepare a USB flash drive that can be booted via a separate machine (non-Mac) via EFI (not legacy MBR).
- I do not have Ethernet, just WiFi (no netboot capability)
- I wanted the root filesystem to be compatible between Linux + Mac + Windows (NTFS/FAT32/ExFAT/EXT4 options; none meet this criteria)
- I wanted to write Debian live image to USB stick, add
toram
boot parameter, turn around and installDebian
to this USB stick. Did not work, doesn't come withdebian-installer-launcher
by default, had to add manually after manualwpa-supplicant
config, then got a random error after partioning.live-toram
also didn't work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
# run installer | |
curl -sfL https://get.k3s.io | sh - | |
# set up .kube/config for user | |
KUBECONFIG_CONTENT=$(sudo k3s kubectl config view --raw) | |
mkdir -p "/home/$USER/.kube" |
# build it with GitHub Actions: https://github.com/brandonros/dropbear/actions/runs/6964141533
# install Cygwin on the machine (probably need libcrypt package)
# run it from Cygwin terminal, not Git Bash or MinGW
mkpasswd -l > /etc/passwd
mkgroup -l > /etc/group
mkdir /etc/dropbear
mkdir ~/.ssh/
vi ~/.ssh/authorized_keys # paste ~/.ssh/id_rsa.pub into it, do not try to connect with passwords
./dropbear -F -E -R -w -s -g -j -k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@vultr:~# journalctl -u k3s | |
Nov 05 20:29:09 vultr systemd[1]: Starting k3s.service - Lightweight Kubernetes... | |
Nov 05 20:29:09 vultr sh[18362]: + /usr/bin/systemctl is-enabled --quiet nm-cloud-setup.service | |
Nov 05 20:29:09 vultr systemctl[18363]: Failed to get unit file state for nm-cloud-setup.service: No such file or directory | |
Nov 05 20:29:09 vultr k3s[18368]: time="2023-11-05T20:29:09Z" level=info msg="Acquiring lock file /var/lib/rancher/k3s/data/.lock" | |
Nov 05 20:29:09 vultr k3s[18368]: time="2023-11-05T20:29:09Z" level=info msg="Preparing data dir /var/lib/rancher/k3s/data/e82313669fe2739df53b3870076163d1fe7785336a68b4771685219e51c9785d" | |
Nov 05 20:29:12 vultr k3s[18368]: time="2023-11-05T20:29:12Z" level=info msg="Starting k3s v1.27.7+k3s1 (b6f23014)" | |
Nov 05 20:29:12 vultr k3s[18368]: time="2023-11-05T20:29:12Z" level=info msg="Configuring sqlite3 database connection pooling: maxIdleConns=2, maxOpenConns=0, connMaxLifetime=0s" | |
Nov 05 20:29:12 vultr k3s[18368]: time="2023-11-05T20:29:12Z" level=info m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dependencies (requires fuse2, not fuse3) | |
sudo apt-get install build-essential checkinstall git autoconf automake libtool-bin libssl-dev python3-distutils python3-dev libusb-1.0-0 libusb-1.0-0-dev fuse libfuse-dev id3v2 | |
# add to fuse | |
sudo groupadd fuse | |
sudo usermod -aG fuse $(whoami) # logout + log back in after | |
# clone | |
for x in libplist libimobiledevice-glue libusbmuxd usbmuxd libimobiledevice ifuse | |
do |
# start clean kubernetes pod
kubectl run -n default alpine --restart=Never --rm -i --tty --image=alpine:3.18 -- /bin/bash
# install dependencies to build kernel
apk update && apk add bash curl make gcc musl-dev linux-headers g++ build-base ncurses-dev openssl-dev elfutils-dev bc diffutils perl
# change shells
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: kaniko | |
labels: | |
app.kubernetes.io/version: "0.6" | |
annotations: | |
tekton.dev/pipelines.minVersion: "0.17.0" | |
tekton.dev/categories: Image Build | |
tekton.dev/tags: image-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
log() { | |
echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ") - $*" | |
} | |
# Call the Vultr API and return the response. | |
call_api() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CYBT_DEBUG 1 | |
#define CYW43_DEBUG 1 | |
#define CYW43_VDEBUG(...) uart_printf(__VA_ARGS__) | |
#define CYW43_VERBOSE_DEBUG 1 | |
#include "pico/stdlib.h" | |
#include "pico/printf.h" | |
#include "pico/cyw43_arch.h" | |
#include "hardware/uart.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
scrape from https://www.espn.com/nba/playbyplay/_/gameId/401547671 with | |
const quarter = document.querySelector('.tabs__wrapper--playByPlay .tabs__list__item--active').innerText | |
const rows = document.querySelectorAll('.playByPlay__tableRow') | |
const plays = [] | |
for (const row of rows) { | |
const index = row.attributes['data-idx'] | |
const time = row.querySelector('.playByPlay__time').innerText | |
const text = row.querySelector('.playByPlay__text').innerText | |
const awayScore = row.querySelector('.playByPlay__score--away').innerText |
NewerOlder