sidskipedia transfered to digital garden

This commit is contained in:
Sindre Kjelsrud 2023-12-10 22:52:18 +01:00
parent 643281df3e
commit bbb940669b
8 changed files with 273 additions and 0 deletions

27
src/pages/garden/index.md Normal file
View file

@ -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)

View file

@ -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.

View file

@ -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 isnt always necessary), then run the below command:
```
netstat -ano | findstr :<PORT>
(Replace <PORT> 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 <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.

View file

@ -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
```

View file

@ -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.

View file

@ -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
...

View file

@ -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 rsyncs 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

9
src/pages/garden/wii.md Normal file
View file

@ -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