Macbuntu is a script to make Ubuntu look like macOS. At the courtesy of Microsoft Copilot.
This file contains hidden or 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
services: | |
nats: | |
image: nats | |
ports: | |
- 4222:4222 | |
- 6222:6222 | |
- 8222:8222 | |
alloy: | |
image: grafana/alloy | |
command: |
This file contains hidden or 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 | |
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" |
This file contains hidden or 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
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)
This file contains hidden or 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
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/" |
This file contains hidden or 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
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}`); |
This file contains hidden or 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
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 = {}; |
This file contains hidden or 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
#!/usr/bin/env bash | |
RED='\033[1;31m' | |
BLUE='\033[1;34m' | |
RESET='\033[0m' | |
# Select compiler. | |
# COMPILER=x86_64-w64-mingw32-g++ | |
COMPILER=g++ |
NewerOlder