I hereby claim:
- I am nicklasfrahm on github.
- I am nicklasfrahm (https://keybase.io/nicklasfrahm) on keybase.
- I have a public key whose fingerprint is 514B 6834 7B8A 81BB A7CA 63C6 5684 94E2 3861 BEDB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
services: | |
nats: | |
image: nats | |
ports: | |
- 4222:4222 | |
- 6222:6222 | |
- 8222:8222 | |
alloy: | |
image: grafana/alloy | |
command: |
#!/bin/bash | |
if [ "$1" != "start" ] && [ "$1" != "stop" ]; then | |
echo "usage: ./chroot.sh <start|stop> <rootfs>" | |
exit 1; | |
fi | |
ACTION=$1 | |
if [ ! -d "$2" ]; then | |
echo "error: invalid directory: $2" |
total 38M | |
drwxr-xr-x 2 nicklasfrahm nicklasfrahm 4.0K Nov 10 00:01 . | |
drwxr-xr-x 13 nicklasfrahm nicklasfrahm 4.0K Nov 10 00:12 .. | |
-rwxr-xr-x 1 nicklasfrahm nicklasfrahm 8.4M Nov 10 00:01 audit | |
-rwxr-xr-x 1 nicklasfrahm nicklasfrahm 13M Nov 10 00:01 gateway-http | |
-rwxr-xr-x 1 nicklasfrahm nicklasfrahm 9.0M Nov 10 00:01 mail | |
-rwxr-xr-x 1 nicklasfrahm nicklasfrahm 8.3M Nov 10 00:01 status |
This document is a collection of useful commands and configurations to set up a Linux system, because I am lazy and I don't want to remember them by heart.
Switch to the user, you would like to set passwordless sudo
up for and run:
echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$(whoami)
PRETTY_NAME="Debian GNU/Linux 10 (buster)" | |
NAME="Debian GNU/Linux" | |
VERSION_ID="10" | |
VERSION="10 (buster)" | |
VERSION_CODENAME=buster | |
ID=debian | |
HOME_URL="https://www.debian.org/" | |
SUPPORT_URL="https://www.debian.org/support" | |
BUG_REPORT_URL="https://bugs.debian.org/" |
const spacer = '--------------------------------------------------'; | |
const decToBin = (dec, paddingCount = 8) => | |
dec.toString(2).padStart(paddingCount, '0'); | |
const sliceBits = (dec, start, end) => { | |
const positiveMask = 2 ** (end + 1) - 1; | |
const negativeMask = 2 ** start - 1; | |
return (dec & (positiveMask - negativeMask)) >> start; | |
}; | |
const round = (num, digits = 2) => | |
+(Math.round(num + `e+${digits}`) + `e-${digits}`); |
const spacer = '--------------------------------------------------'; | |
const decToBin = (dec, paddingCount = 8) => | |
dec.toString(2).padStart(paddingCount, '0'); | |
console.log(`${spacer}\nExercise 1\n${spacer}`); | |
{ | |
const addressSize = 8; | |
const addressReferences = [3, 180, 43, 2, 191, 88, 190, 2, 88]; | |
const indexes = {}; |