Public

Public Documentation

Reset Repo Commits

Linux

export GIT_RESET_USER=yourUserNameOrOrgName
export GIT_RESET_REPO=yourRepoName
rm -rf .git
git init
git add .
git checkout -b main
git commit -m "Initial Commit"
git remote add origin git@github.com:$GIT_RESET_USER/$GIT_RESET_REPO.git
git remote set-url origin https://github.com/$GIT_RESET_USER/$GIT_RESET_REPO.git
git push -u --force origin main

Windows

set GIT_RESET_USER=yourUserNameOrOrgName
set GIT_RESET_REPO=yourRepoName
rd /s /q .git
git init
git add .
git checkout -b main
git commit -m "Initial Commit"
git remote add origin git@github.com:%GIT_RESET_USER%/%GIT_RESET_REPO%.git
git remote set-url origin https://github.com/%GIT_RESET_USER%/%GIT_RESET_REPO%.git
git push -u --force origin main

GitHub API: Organization Membership

This simple curl command will set your membership to public/private for any organization.

A use case would be an organization so big you can't search for yourself.

For this to work, you need a GitHub Personal Access Token.

# To make an org private, replace PUT with DELETE
curl \
  -X PUT \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: token xxxxxxxxxxxxxxxx" \
  https://api.github.com/orgs/YourOrgUsernameHere/public_members/YourGitHubUsernameHere

GitHub API Docs

Saving chmod +x in a Git Repo

export fileType=.sh
git config core.fileMode true
find . -type f -iname "*$fileType" -exec chmod +x {} \;
find . -type f -iname "*$fileType" -exec git update-index --chmod=+x {} \;
git add . && git commit -am "Update Execute Permissions" && git push

Prune Docker

docker image prune -a -f
docker volume prune -f
docker network prune -f

Regex

Empty Lines after if/else/while/for

(if |else |else if |for |while ).+\n\n

Resources

HTML Redirects

Redirect to another site with HTML.

<!-- index.html -->
<meta http-equiv="refresh" content="0; url=https://example.com">
# .htaccess
ErrorDocument 404 https://example.com

Resizing HDD (Linux)

  1. Resize disk with any solution (GParted, etc).
  2. Use lsblk to get the partition you want to expand.
  3. sudo growpart /dev/sda 2 # 2 is the partition you want to increase in size.
  4. sudo resize2fs /dev/sda2

Ultimate Media Server Guide


sudo apt update && sudo apt upgrade -y
sudo apt install unattended-upgrades apt-listchanges -y
sudo dpkg-reconfigure -plow unattended-upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
sudo apt-get install ca-certificates curl gnupg lsb-release wget gpg software-properties-common apt-transport-https -y
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
sudo usermod -a -G docker yourUserName
exit
# Relogin here.
docker ps
mkdir -p ~/{dockerData,movies,tv,music,books,downloads}
mkdir -p ~/dockerData/{qbittorrent,sonarr,radarr,lidarr,readarr,prowlarr}
mkdir -p ~/dockerData/qbittorrent/{wireguard,qBittorrent}
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
wget https://downloads.plex.tv/plex-keys/PlexSign.key
cat PlexSign.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/Plex.gpg
rm PlexSign.key
sudo apt update
sudo apt install plexmediaserver -y
sudo systemctl enable --now plexmediaserver
sudo usermod -a -G yourUserName plex
nano docker-compose.yml

docker-compose File:

---
version: "3.6"
services:
    qbittorrent:
        privileged: true
        container_name: "qbittorrent"
        environment:
            - "VPN_ENABLED=yes"
            - "VPN_TYPE=wireguard"
            - "LAN_NETWORK=192.168.0.0/24"
        image: "dyonr/qbittorrentvpn:latest"
        ports:
            - "8080:8080/tcp"
        restart: "unless-stopped"
        volumes:
            - "~/downloads:/downloads"
            - "~/dockerData/qbittorrent:/config"
        sysctls:
            - "net.ipv6.conf.all.disable_ipv6=0"
            - "net.ipv4.conf.all.src_valid_mark=1"
    watchtower:
        container_name: "watchtower"
        image: "containrrr/watchtower:latest"
        restart: "unless-stopped"
        volumes:
            - "/var/run/docker.sock:/var/run/docker.sock"
    prowlarr:
        container_name: "prowlarr"
        image: "lscr.io/linuxserver/prowlarr:develop"
        ports:
        - "9696:9696"
        restart: "unless-stopped"
        volumes:
        - "~/dockerData/prowlarr:/config"
    # If you want to remove a service simply delete it's section below.
    sonarr: # TV Shows
        container_name: "sonarr"
        environment:
        - "PUID=1000"
        - "PGID=1000"
        image: "lscr.io/linuxserver/sonarr:latest"
        ports:
        - "8989:8989/tcp"
        restart: "unless-stopped"
        volumes:
        - "~/dockerData/sonarr:/config"
        - "~/tv:/tv"
        - "~/downloads:/downloads"
    radarr: # Movies
        container_name: "radarr"
        environment:
        - "PUID=1000"
        - "PGID=1000"
        image: "lscr.io/linuxserver/radarr:latest"
        ports:
        - "7878:7878/tcp"
        restart: "unless-stopped"
        volumes:
        - "~/dockerData/radarr:/config"
        - "~/movies:/movies"
        - "~/downloads:/downloads"
    lidarr: # Music
        container_name: "lidarr"
        environment:
        - "PUID=1000"
        - "PGID=1000"
        image: "lscr.io/linuxserver/lidarr:latest"
        ports:
        - "8686:8686/tcp"
        restart: "unless-stopped"
        volumes:
        - "~/dockerData/lidarr:/config"
        - "~/music:/music"
        - "~/downloads:/downloads"
    readarr: # eBooks/Audio Books
        container_name: "readarr"
        environment:
        - "PUID=1000"
        - "PGID=1000"
        image: "lscr.io/linuxserver/readarr:develop"
        ports:
        - "8787:8787/tcp"
        restart: "unless-stopped"
        volumes:
        - "~/dockerData/readarr:/config"
        - "~/books:/books"
        - "~/downloads:/downloads"
docker compose up -d
docker ps
nano ~/dockerData/qbittorrent/wireguard/wg0.conf
# Paste your Wireguard Config in that file
exit

Continue with the rest of the video guide.


Setting Plex to Maximum Quality

You should set Plex to maximum quality whenever possible so your CPU doesn't have to work as hard streaming the video to you.

For a guide, please see this website and select your platform you are watching on.

Alternatively:

Browser/Desktop App iOS/Android App tvOS App Most Other Clients

Halo Install Guides

Halo Install Guides

Halo: CE Install Guide

  1. Download and extract Halo CE.
  2. Run install.bat from the HaloCE folder.
  3. Run the game from the desktop shortcut.

Notes:

Halo Install Guides

Halo 2 Install Guide

  1. Download and extract Halo 2.
  2. Run halo2.exe.
  3. Create an account in game & verify your email.
  4. Log into Halo 2.
  5. Download any updates.