Skip to content

Instantly share code, notes, and snippets.

View maltechx's full-sized avatar
🏙️
Working

Malte maltechx

🏙️
Working
View GitHub Profile
@maltechx
maltechx / install.sh
Created March 9, 2023 19:44
Personal Arch Install Script
#!/bin/bash
NVME=nvme0n1
HOSTNAME=neongruen
USERNAME=malte
read -rp "Enter your encryption passphrase: " PASSWORD
read -rp "Verify your encryption passphrase: " PASSWORD_VERIFY
if [ "$PASSWORD" != "$PASSWORD_VERIFY" ]; then
echo "Passphrases don't match"
exit 1
else
@maltechx
maltechx / clouflare-worker-static-page-backblaze.js
Last active October 26, 2023 08:41
Host a static page on Backblaze and distribute it via Cloudflare and their Workers.
// Imprved the script from this blog https://www.grahn.io/posts/2020-02-08-s3-vs-b2-static-web-hosting/
// Backblaze Url
const baseURL = "https://f000.backblazeb2.com/file/yourbucket"
addEventListener('fetch', event => {
event.respondWith(handleRequest(event))
})
async function handleRequest(event) {
[Unit]
Description=TeamSpeak Server
After=network.target
[Service]
WorkingDirectory=/opt/teamspeak3-server_linux_amd64/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/opt/teamspeak3-server_linux_amd64/ts3server_startscript.sh start inifile=ts3server.ini
@maltechx
maltechx / update-teamspeak.sh
Created April 9, 2020 10:15
Short script for creating a backup an updating Teamspeak server automatically.
# Upgrade for Teamspeak Server
# Call this script with eg. bash update-teamspeak.sh 3.12.1
# Please set absolute paths!
# Set here your server directory
TSPATH=/home/teamspeak
# Path where server gets backuped befor upgrade
BACKUPPATH=/backup
if [ -z "$1" ]; then
echo "No version number given."
@maltechx
maltechx / youtube-dl_only_mp4.sh
Last active July 10, 2019 21:46
youtube-dl only mp4
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' YOUR_VIDEO
@maltechx
maltechx / bandwidth.chart.sh
Last active January 10, 2020 23:35
Netdata chart for Bandwith used since reboot
# no need for shebang - this file is loaded from charts.d.plugin
# netdata
# This has to go unter /usr/libexec/netdata/charts.d/bandwidth.chart.sh or /etc/netdata/charts.d/bandwidth.chart.sh or /opt/netdata/netdata-plugins/charts.d/bandwidth.chart.sh
# real-time performance and health monitoring, done right!
# (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
bandwidth_update_every=1
bandwidth_priority=100
# Should this chart be enabled?