Skip to content

Instantly share code, notes, and snippets.

View charlieporth1's full-sized avatar

Charles Porth charlieporth1

View GitHub Profile
@charlieporth1
charlieporth1 / purge-all-ubuntu-desktop.sh
Last active June 3, 2026 18:58
Purge All Ubuntu Desktop
# Purge
apt purge -y 'gdm*'
apt purge -y lightdm
apt purge -y '*gnome*'
apt purge -y '*unity*'
apt purge -y '*ubuntu-desktop*'
apt purge -y xfce4
apt purge -y 'xfce4-*'
apt purge -y lxde
apt purge -y lxqt
sed -i.bk 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list
@charlieporth1
charlieporth1 / oneshot_setup.sh
Created August 30, 2024 02:26 — forked from oskar456/oneshot_setup.sh
Raspberry Pi Zero USB gadget mode with ethernet and serial
#!/bin/sh
# Enable gadget mode
echo "dtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt
systemctl enable setupgadget.service
# alternatively: ln -s /etc/systemd/system/setupgadget.service /etc/systemd/system/basic.target.wants/setupgadget.service
# Enable getty on the virtual serial line
systemctl enable serial-getty@ttyGS0.service
# alternatively: ln -s /lib/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyGS0.service
@charlieporth1
charlieporth1 / etc_init.d_tailscaled
Last active November 5, 2024 03:41
Init.d file for tailscale (/etc/init.d/tailscaled)
#! /bin/bash
#
### BEGIN INIT INFO
# Provides: my-service-name
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: your description here
### END INIT INFO
server {
listen ctp-vpn.local:80;
listen ctp-vpn.local:443 ssl;
listen ctp-vpn.local:27443 quic reuseport;
listen [::]:80;
listen [::]:443 ssl;
listen [::]:27443 quic reuseport;
server {
listen ctp-vpn.local:80;
listen ctp-vpn.local:3333;
listen [::]:80;
listen [::]:3333;
server_name
http.charlesp.net
simple-http.charlesp.net
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
</head>
<body>
<h1>Simple HTTP website</h1>
<p>Charles Porth created this website</p>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
</head>
<body>
<h1>Manual Password Browser Saver</h1>
<p>Created for saving a username and password to a browser's autofill</p>
@charlieporth1
charlieporth1 / adlists.list
Last active November 1, 2023 15:48
Pi-Hole Adlist
blocklist.site/app/dl/ads
http://hostsfile.mine.nu/hosts0.txt
http://jasonhill.co.uk/pfsense/ytadblock.txt
http://malwaredomains.lehigh.edu/files/domains.txt
http://mirror1.malwaredomains.com/files/justdomains
http://pgl.yoyo.org/adservers/serverlist.php
http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts;showintro=0
http://pilotfiber.dl.sourceforge.net/project/adzhosts/HOSTS.txt
http://private-lists.whisky.software/txt_lists/ctp-lists/china-blacklist.list
http://private-lists.whisky.software/txt_lists/ctp-lists/vulnerability-blacklist.list
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
export OS_ID=$(cat /etc/os-release | grep -E ^ID= | awk -F= '{print $2}' | awk '{print $1=$1}')
export VERSION_CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | awk -F= '{print $2}' | awk '{print $1=$1}')
dpkg --add-architecture i386
apt-get update
apt-get install -y ca-certificates apt-transport-https curl wget