Skip to content

Instantly share code, notes, and snippets.

View GlitchWitch's full-sized avatar
🎃
Pronouns: They/Them

GlitchWitch GlitchWitch

🎃
Pronouns: They/Them
View GitHub Profile
@GlitchWitch
GlitchWitch / logitech-c920-darkroom.sh
Last active June 3, 2022 16:52
Logitech C920 Ubuntu Exposure/Brightness Config (Dark Room, Key Light)
# Improved
v4l2-ctl -d /dev/video0 -c exposure_auto=1
v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=150
v4l2-ctl -d /dev/video0 --set-ctrl=contrast=150
v4l2-ctl -d /dev/video0 --set-ctrl=brightness=128
v4l2-ctl -d /dev/video0 --set-ctrl=saturation=140
# Restore Default
v4l2-ctl -d /dev/video0 --set-ctrl=exposure_absolute=250
v4l2-ctl -d /dev/video0 -c exposure_auto=3
@GlitchWitch
GlitchWitch / dante-setup.md
Last active June 12, 2022 18:43
Setup a simple proxy server with dante

Install the server

sudo apt install dante-server

Update the config file

sudo rm /etc/danted.conf
sudo nano /etc/danted.conf
@GlitchWitch
GlitchWitch / 0-vlan-to-wan2.md
Last active February 15, 2023 02:17
UDMP VLAN to WAN2 Policy Based Routing

Ubiquiti UDM-Pro Dual-WAN Setup Scripts

VLAN to WAN2 Policy Based Routing + Disable WAN Failover

Tested on UDM-Pro 1.10.0

The following scripts can be used on a UDM-Pro with on boot script to force specific vlans out WAN2 as well as prevent that traffic from going out wan1 and all other traffic from going out wan2 in the event one WAN is disconnected.

curl -fsSLo /mnt/data/on_boot.d/98-vlan_to_wan2.sh https://gist.githubusercontent.com/GlitchWitch/9833888842dbd7d0b42669faab4c4a4a/raw/9ede55da6820c65c3aeb5d0951a71855641b0041/98-vlan_to_wan2.sh 
@GlitchWitch
GlitchWitch / rtl8156-ubuntu.md
Last active April 22, 2024 15:10
Setup the RTL8156 USB2.5G Ethernet Adapter on Ubuntu 20.04
@GlitchWitch
GlitchWitch / Delete Twilio Logs.md
Last active March 13, 2021 03:17
Bash scripts for deleting all Voicemails, Call Logs, and Messages from your Twilio account.
@GlitchWitch
GlitchWitch / _OpenVPN Server for LAN Access only.md
Last active May 3, 2024 09:24
OpenVPN Server for LAN Access only (no internet forwarding)

How to setup an OpenVPN server for LAN Access only

Install OpenVPN

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

Edit server.conf

/etc/openvpn/server/server.conf

Change the OpenVPN LAN address to prevent interfering with other OpenVPN connections

@GlitchWitch
GlitchWitch / twilio-sms-forward.php
Last active June 19, 2022 21:12
Twilio SMS Forward + Auto-response
<?php
/**
* This section ensures that Twilio gets a response.
*/
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<Response><Message>Your message could not be delivered. This number only accepts encrypted messages through Signal Private Messenger. Download it here https://signal.org/install</Message></Response>'; //Place the desired response (if any) here
/**
* This section actually sends the email.
@GlitchWitch
GlitchWitch / cloudflare-reverse-proxy.sh
Last active January 2, 2024 01:57
Configure the server to act as a forwarder for port 80/443 While only allowing traffic from Cloudflare IPs
# !/bin/bash
#
# Configure server to act as a reverse proxy for port 80/443 and only allow Cloudflare IPs
# Usage: bash cloudflare-reverse-proxy.sh destinationip managmentip
# Clear existing iptables
iptables -F
# Forward traffic from Cloudflare
background-image: url("data:image/jpg;base64,<\/style><svg/onload=alert(document.domain)>");
background-color: #cccccc;
acl_smtp_mail=acl_check_mail
acl_smtp_data=acl_check_data
begin acl
acl_check_mail:
.ifdef CHECK_MAIL_HELO_ISSUED
deny
message = no HELO given before MAIL command
condition = ${if def:sender_helo_name {no}{yes}}
.endif