#!/usr/bin/env bash | |
set -ex | |
PACKAGES=( | |
neovim-git | |
) | |
# All this is basically to get around makepkg calling pacman with sudo | |
# Otherwise we could just call `aur sync` and be done with it |
#!/bin/bash | |
FW_MARK="$((RANDOM%2147483646 + 1))" | |
if [ "$(ip -4 rule show fwmark ${FW_MARK})" ] || [ "$(ip -6 rule show fwmark ${FW_MARK})" ]; then | |
while [ "$(ip -4 rule show fwmark ${FW_MARK})" ] || [ "$(ip -6 rule show fwmark ${FW_MARK})" ]; do | |
FW_MARK="$((RANDOM%2147483646 + 1))" | |
done | |
fi | |
TABLE="$((RANDOM%2147483396 + 1))" | |
if [ ! "$(ip -4 route show table ${TABLE} 2>/dev/null || echo 1)" = "1" ] || [ ! "$(ip -6 route show table ${TABLE} 2>/dev/null || echo 1)" = "1" ]; then |
Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.
So now, there's a scribe for that :
A way to install Alpine Linux on a Scaleway Stardust instance without the use of a rescue image, but by booting into the install image over the network using https://netboot.xyz.
-
Connect to the serial console, using
scw instance server console {uuid} zone={zone}
-
Reboot the VM into UEFI settings
-
Go to
Device Manager
->Network Device List
-> the only network device ->HTTP Boot Configuration
->Boot URI
package main | |
import ( | |
"archive/zip" | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" |
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage | |
# things to replace: | |
# * 10.1.1.0 - your subnet | |
# * eth0 - interface to listen on, or switch to bind-dynamic | |
# * 10.1.1.2 - your tftp server ip | |
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE | |
# Debug logging | |
log-debug |
- Reboot into the rescue image
- Then execute these commands:
cd /dev/shm
mkdir alpine
cd alpine
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-minirootfs-3.16.0-x86_64.tar.gz
tar xzvf alpine*
mount -t proc /proc proc/
mount -t sysfs /sys sys/
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)