Skip to content

Instantly share code, notes, and snippets.

View ey3ball's full-sized avatar

Florian Vallee ey3ball

View GitHub Profile
# Step 1 : preprocess the input
f = open("input.txt")
insts = f.readlines()
processed = []
for i in insts:
if i.startswith("$ cd /"):
processed.append("cd /home/ey3ball/projects/2022/fs/\n")
elif i.startswith("$ ls"):
#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
GROUP=$(id -gn)
SUBUID=root:$_UID:1
SUBGID=root:$GID:1
# give lxd permission to map your user/group id through
grep $SUBUID /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root