Skip to content

Instantly share code, notes, and snippets.

View LiamPerson's full-sized avatar
⌨️
AI, Blockchain, Decentralization, Power to the People!

LiamPerson

⌨️
AI, Blockchain, Decentralization, Power to the People!
  • Australia
View GitHub Profile
@LiamPerson
LiamPerson / collect-all-files.js
Created April 13, 2025 04:37
Put all code in current directory into one file with markdown formatting with NodeJS
const fs = require("fs");
const path = require("path");
// Directory to search for code files
const directoryPath = "./"; // Change this to your target directory if needed
// Files to exclude from processing
const excludedFiles = ["collect-files-for-ai.js"];
// Create a new file called code-summary.md
@LiamPerson
LiamPerson / how-to-install-nvidia-debian11.md
Created April 8, 2025 12:03
How to install NVIDIA drivers on Debian 11

How to install NVIDIA drivers on Debian 11

  1. Install a bunch of dependencies: apt install libxml2 libstdc++6 linux-headers-$(uname -r) build-essential libglu1-mesa-dev libx11-dev libxi-dev libxmu-dev freeglut3 freeglut3-dev
  2. Reboot
  3. Download the cuda installer https://us.download.nvidia.com/XFree86/Linux-x86_64/570.133.07/NVIDIA-Linux-x86_64-570.133.07.run
  4. Make the installer executable: chmod +x {the-file}
  5. Run the file as the root user: su - (the - is important so you can have access to $PATH!)
  6. Accept the license. It will fail. It did some changes before it died though such as disable noveau. Just reboot and try again.

That's it!

@LiamPerson
LiamPerson / aptly-debian-arch.md
Created April 7, 2025 13:30
How I got a local Debian mirror running on Arch Linux

How I got a local Debian mirror running on Arch Linux

I want to have a local Debian mirror so my systems can run entirely off of my local network instead of needing a constant internet connection.

To get this working, I found two main packages that should support this apt-mirror and aptly.

I found apt-mirror had poor configuration and I was having extreme difficulty getting the script to run from source, so instead I opted for aptly.

How to get Aptly running on Arch Linux:

@LiamPerson
LiamPerson / install-operating-system-on-chromebook.md
Created March 31, 2025 21:47
How to install any operating system on a Chromebook (From what I can remember)

Links that helped me install Debian on a Chromebook and Things I remember needing to do:

  1. Boot in developer mode and access the Chrome terminal https://www.tbi.univie.ac.at/~ronny/acer-cb5-311.html https://wiki.debian.org/InstallingDebianOn/HP/Chromebook%2014 https://www.howtogeek.com/210817/how-to-enable-developer-mode-on-your-chromebook/

  2. Remove the battery as it had write protection to the operating system or disk https://docs.mrchromebox.tech/docs/firmware/wp/

  3. Allow executing scripts on the disk.

@LiamPerson
LiamPerson / dontpastemypassword.md
Created December 11, 2024 04:53
How to stop X Window System (xorg / x11) from pasting on middle mouse click / button press

How to stop X Window System (xorg / x11) from pasting on middle mouse click / button press

This was made to work with Arch

Steps:

  1. Install xmousepasteblock from the Arch User Repository: https://aur.archlinux.org/packages/xmousepasteblock

(Recommended to just use yay:

# Install yay package manager
sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si
@LiamPerson
LiamPerson / esp32cam_instructions.md
Last active September 14, 2024 17:58
Arch Linux Tutorial | How to build with the ESP32-CAM (AI Thinker) & Arduino IDE

How to build the example server for the ESP32-CAM (AI-Thinker) for the Arduino IDE from nothing on Arch Linux

Unlike most operating systems, there is a special trouble (for noobs) with performing this on Arch due to the amount of compiling from source.

Steps

Get the Arduino IDE (v1 because it is the best)

We want to run the v1 Arudino environment/IDE because it is the most compatible with tutorials online. If you are reading this you are probably a noob and following said tutorials.

@LiamPerson
LiamPerson / pi_mount_usb.md
Created June 15, 2024 13:39 — forked from etes/pi_mount_usb.md
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

@LiamPerson
LiamPerson / audio_genres.json
Created August 23, 2023 15:09
My descriptions for various music genres.
[
{ "name": "Unknown", "description": "For music that has no genre assigned." },
{ "name": "Alternative rock", "description": "Calmer variant of rock. Has a focus on vibes." },
{ "name": "Ambient", "description": "Music that can easily fade into the background. Calming stuff!" },
{
"name": "Breakbeat",
"description": "A genre of electronic music characterized by the use of breaks, often sampled from earlier recordings in funk, jazz, and R&B, for the main rhythm."
},
{ "name": "Chillstep", "description": "A subgenre of dubstep that focuses on a more melodic and relaxing sound." },
{ "name": "Classical", "description": "Lots of traditional instruments, and a focus on the melody." },
@LiamPerson
LiamPerson / Precommits with NextJS.md
Last active July 19, 2023 14:54
How I set up precommits with my nextjs projects to support linting and prettifying my staged files.

Automatic linting + prettifying staged files

Note that this only works for NextJS projects

  • (needed for good eslinting) Add a .eslintrc.json file to the root of your project with the following contents:
{
  "extends": "next/core-web-vitals"
}
  • (optional prettier config) Add a .prettierrc file to the root of your project with the following contents:
@LiamPerson
LiamPerson / yt-dlp.conf
Created June 16, 2023 14:59
My yt-dlp config
--ignore-errors
# --no-playlist
# Save in ~/Videos
-o D:/Videos/YTDL/%(title)s_%(resolution)s_%(fps)s.%(ext)s --restrict-filenames
# Prefer 1080p or lower resolutions
-f bestvideo[ext=mp4][height<1200]+bestaudio[ext=m4a]/bestvideo[ext=webm][height<1200]+bestaudio[ext=webm]/bestvideo[height<1200]+bestaudio/best[height<1200]/best