Skip to content

Instantly share code, notes, and snippets.

View duzhaokun123's full-sized avatar
🐖
自暴自弃

o0kam1 duzhaokun123

🐖
自暴自弃
View GitHub Profile
@duzhaokun123
duzhaokun123 / opencode.sh
Last active September 9, 2026 19:49
opencode bubblewrap
#!/bin/sh
mkdir -p /var/tmp/opencode
if [ "$PWD" = "$HOME" ]; then
WORK_DIR="/sandbox"
else
BIND_PWD="--bind $PWD $PWD"
WORK_DIR="$PWD"
fi
exec bwrap \
@duzhaokun123
duzhaokun123 / archlinux-lxc-post-install.sh
Last active April 22, 2024 16:41
archlinux lxc post install
# Init pacman mirror
curl -s -L "https://www.archlinux.org/mirrorlist/?country=CN&protocol=http&ip_version=6" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist
# Init key
pacman-key --init
# Init archlinux key
pacman-key --populate archlinux
# Update archlinux-keyring
yes '' | pacman -Sy archlinux-keyring
# Sync repo
yes '' | pacman -Syu