From bbb940669b15da97883a16e00d377d4595c97a6b Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Sun, 10 Dec 2023 22:52:18 +0100 Subject: [PATCH] :sparkles: sidskipedia transfered to digital garden --- src/pages/garden/index.md | 27 +++++++++++ src/pages/garden/instructions/linux.md | 44 ++++++++++++++++++ src/pages/garden/instructions/windows.md | 50 +++++++++++++++++++++ src/pages/garden/instructions/wireguard.md | 52 ++++++++++++++++++++++ src/pages/garden/machines/kanto.md | 30 +++++++++++++ src/pages/garden/services/mc_server.md | 30 +++++++++++++ src/pages/garden/services/sidbot.md | 31 +++++++++++++ src/pages/garden/wii.md | 9 ++++ 8 files changed, 273 insertions(+) create mode 100644 src/pages/garden/index.md create mode 100644 src/pages/garden/instructions/linux.md create mode 100644 src/pages/garden/instructions/windows.md create mode 100644 src/pages/garden/instructions/wireguard.md create mode 100644 src/pages/garden/machines/kanto.md create mode 100644 src/pages/garden/services/mc_server.md create mode 100644 src/pages/garden/services/sidbot.md create mode 100644 src/pages/garden/wii.md diff --git a/src/pages/garden/index.md b/src/pages/garden/index.md new file mode 100644 index 0000000..3e2be2a --- /dev/null +++ b/src/pages/garden/index.md @@ -0,0 +1,27 @@ +--- +title: 'Digital garden' +description: 'πŸͺ΄ My personal digital garden. A wild garden, filled with drafts, ideas and more.' +layout: "../../layouts/Layout.astro" +--- +> 🌱 *Seedlings for very rough and early ideas.* +🌿 *Budding for work I've cleaned up and clarified.* +🌳 *Evergreen for work that is reasonably complete.* + +#### Machines + +- [kanto 🌳](/garden/machines/kanto) + +#### Instructions + +- [Wireguard 🌱](/garden/instructions/wireguard) +- [Linux 🌱](/garden/instructions/linux) +- [Windows 🌱](/garden/instructions/windows) + +#### Services + +- [sidBot 🌱](/garden/services/sidbot) +- [sidsIgloo Minecraft Server 🌱](/garden/services/mc_server) + +#### Random + +- [Wii 🌱](/garden/wii) \ No newline at end of file diff --git a/src/pages/garden/instructions/linux.md b/src/pages/garden/instructions/linux.md new file mode 100644 index 0000000..6831a52 --- /dev/null +++ b/src/pages/garden/instructions/linux.md @@ -0,0 +1,44 @@ +--- +title: 'Linux' +description: '🌱 ~ Some info I keep forgetting on Linux lol' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +... + +## ❓ Random + +### Remove .DS_Store files + +`find . -name ".DS_Store" -print -delete` + +### Get & Send files/folders from/to Linux machine + +``` +Get files/folder from Linux machine: +scp -r sid@10.0.0.1:minecraft-old/ Desktop + +Send files/folder to Linux machine: +scp pepenarutorun.png sid@10.0.0.1:~/minecraft-old +``` + +### How to Format USB using the Terminal (link) + +**Step 1: Locate USB Drive** + +> Open the terminal and run the following command: ***df*** +The terminal prints out a list of all mounted partitions and relevant information: used space, available space, used space percentage, and the path. +Locate the USB in the list and find the corresponding device. + +**Step 2: Unmount and Format USB Drive** + +> Unmount the USB drives before formatting. To do so, run this command: ***sudo umount {USB_FILESYSTEM}***. After unmounting, format the USB drive using the preferred file system: +> - FAT32 file system: sudo mkfs.vfat /dev/{NAME_OF_DEVICE} +> - NTFS file system: sudo mkfs.ntfs /dev/{NAME_OF_DEVICE} +> - exFAT file system: sudo mkfs.exfat /dev/{NAME_OF_DEVICE} + +**Step 3: Verify USB Drive Formatting** + +> Confirm the formatting process has completed successfully: ***sudo fsck /dev/{NAME_OF_DEVICE}***. A USB drive with no files indicates successful formatting. \ No newline at end of file diff --git a/src/pages/garden/instructions/windows.md b/src/pages/garden/instructions/windows.md new file mode 100644 index 0000000..5cf0b62 --- /dev/null +++ b/src/pages/garden/instructions/windows.md @@ -0,0 +1,50 @@ +--- +title: 'Windows' +description: '🌱 ~ Some info I keep forgetting on Windows lol' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +... + +## ❓ Random + +### How do I remove the process currently using a port on localhost in Windows? (link) + +**1.** Open up cmd.exe (note: you may need to run it as an administrator, but this isn’t always necessary), then run the below command: + +``` +netstat -ano | findstr : + +(Replace with the port number you want, but keep the colon) + +ps: the last column is the PID (process identifier) +``` + +**2.** Next, run the following command: + +`taskkill /PID /F` + + +### How to Format a Bootable USB Drive (link) + +This is for when you want to restore back your pen drive to its usual condition. +This is done by formatting the pen drive via DiskPart by follwoing the steps under: + +**1.** Open Run using the key combination (Win key + R). + +**2.** Type cmd to open Command Prompt. + +**3.** Type diskpart and run the pop-up winidow that appears. This opens DiskPart. + +**4.** Type list disk. This will list all the memory storage devices connected to the PC. + +**5.** Type select disk 1. (usually disk 1 if no other storage devices are connected). +The number specifies the drive to be formatted. Drive 0 wil be your internal hard disk. Identify and select your disk correctly. + +**6.** Type clean. This wipes data off your pen drive. + +**7.** Type create partition primary. This will format the pen drive as FAT. + +**8.** Now go to My Computer or This PC, and format the pen drive by right clicking on it and selecting the format option. \ No newline at end of file diff --git a/src/pages/garden/instructions/wireguard.md b/src/pages/garden/instructions/wireguard.md new file mode 100644 index 0000000..a25e099 --- /dev/null +++ b/src/pages/garden/instructions/wireguard.md @@ -0,0 +1,52 @@ +--- +title: 'Wireguard' +description: '🌿 ~ Some info I keep forgetting lol' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +[Wireguard](https://www.wireguard.com/) is a VPN service I use to connect to the server at home. + +One needs to configure the connection between the machine server and the new device. + + +## πŸ“‹ Different commands + +- ***get servers network info*** + +`ifconfig` + +- ***generate private & public keys*** + +`wg genkey | tee privatekey | wg pubkey > publickey` + +- ***change permissions*** + +`chmod 600 privatekey && chmod 600 wg0.conf` + +- ***start and enable wireguard server*** + +`systemctl start wg-quick@wg0 && systemctl enable wg-quick@wg0` + +- ***check status*** + +`systemctl status wg-quick@wg0` + +- ***add client on wireguard server*** + +`wg set wg0 peer PUBLICKEY_CLIENT allowed-ips ADDRESS_CLIENT && wg-quick show wg0` + +- ***wg0.conf*** + +``` +[Interface] +Address = redacted/24 +ListenPort = 55555 +PrivateKey = redacted + +PostUp = iptables -A FORWARD -i wg0 -j ACCEPT +PostUp = iptables -t nat -A POSTROUTING -o SERVER_IFCONFIG_NAME -j MASQUERADE +PostDown = iptables -D FORWARD -i wg0 -j ACCEPT +PostDown = iptables -t nat -D POSTROUTING -o SERVER_IFCONFIG_NAME -j MASQUERADE +``` \ No newline at end of file diff --git a/src/pages/garden/machines/kanto.md b/src/pages/garden/machines/kanto.md new file mode 100644 index 0000000..4771690 --- /dev/null +++ b/src/pages/garden/machines/kanto.md @@ -0,0 +1,30 @@ +--- +title: 'Kanto' +description: '🌳 ~ My first "server" <3 (Out of prod ⚰️)' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +Kanto was an old MacBook Air I had lying around. Since joining [friByte](https://fribyte.no) I wanted to setup my own server at home, and with some tips from friends I decided why not use an old laptop (even though it's kinda cursed to use a MacBook Air lol). + +I learned tons from it and had so much fun trying out different stuff! + + +## πŸ—οΈ Setup +``` +OS: Ubuntu 20.04.6 LTS x86_64 + +Host: MacBook Air 7,2 1.0 + +CPU: Intel i5-5250U (4) @ 2.700GHz + +GPU: Intel HD Graphics 6000 + +Memory: ~4GB +``` + + +## πŸš€ Stuff hosted on it + +On Kanto I hosted a minecraft server, my Discord bot ~ "[sidBot](https://github.com/SindreKjelsrud/sidBot)", and a Wireguard VPN. \ No newline at end of file diff --git a/src/pages/garden/services/mc_server.md b/src/pages/garden/services/mc_server.md new file mode 100644 index 0000000..09e58ba --- /dev/null +++ b/src/pages/garden/services/mc_server.md @@ -0,0 +1,30 @@ +--- +title: 'sidsIgloo ~ A Minecraft server' +description: '🌱 ~ Very rough notes about the server' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +... + +## πŸ› οΈ How to run + +``` +1. Start screen with `screen` +2. Run start command: `java -Xmx4096M -jar server.jar nogui` +3. Press "ctrl + a + d" to exit screen +4. To enter the running screen, write `screen -r` +``` + +## πŸ‘· Installation + +... + +## The process + +... + +### Plugins + +... \ No newline at end of file diff --git a/src/pages/garden/services/sidbot.md b/src/pages/garden/services/sidbot.md new file mode 100644 index 0000000..148299a --- /dev/null +++ b/src/pages/garden/services/sidbot.md @@ -0,0 +1,31 @@ +--- +title: 'sidBot' +description: '🌱 ~ Very rough notes about the bot' +layout: "../../../layouts/Layout.astro" +--- + +## πŸ“ Info + +This is a Discord bot made by me with JavaScript. I made it originally in Python, but there were some talk about the *discord.py* library getting shut down so I switched. Here's the source code: [GitHub link](https://github.com/SindreKjelsrud/sidBot) + +## πŸ‘· Installation + +When cloning the repository for the first time, you must run an ***npm install*** to download the correct dependencies. + +## πŸ”¨ bot.sh - Script + +This script is designed to launch the bot as quickly as possible on the server (not the longest script but saves a few seconds lol). + +`cd sidBot-js/ && node .` + +## πŸ’‘ TODO() + +- [ ] Fix Github Actions so it r’syncs to my server on updates. +- [ ] An auto welcome message for new users on the server +- [ ] !Xquote - Bot sends quotes from breaking bad, star wars etc. +- [ ] !ascii {text} - Bot sends text in ascii-form +- [ ] !rps - Rock-Paper-Scissors game +- [ ] !poll - Bot lets user create a poll with emojis which indicates options +- [ ] !movie - Bot sends a movie recommendation from a movie database +- [ ] !trivia - Bot sends a random trivia question both with and without multiple choice answers +- [ ] !stats - Bot sends a statistic for the discord server, like total servermembers, bots and online members diff --git a/src/pages/garden/wii.md b/src/pages/garden/wii.md new file mode 100644 index 0000000..786a511 --- /dev/null +++ b/src/pages/garden/wii.md @@ -0,0 +1,9 @@ +--- +title: 'Help for Nintendo Wii' +description: '🌱 ~ Notes to remember for my modded Wii' +layout: "../../layouts/Layout.astro" +--- + +## How to split files >4GB + +## How to get online-function in games