Vol. 1, Issue #1 in the "Daniel Fucking Nerd-Sniped Me" Series
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"sync" | |
"net/http" | |
"net/url" | |
"strings" | |
"time" | |
"fmt" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for f in `find . -type f | grep -v "webp"` | |
do | |
fname=`basename $f | rev | cut -d . -f2 | rev` | |
fext=`basename $f | rev | cut -d . -f1 | rev` | |
fdir=`dirname $f` | |
target="$fdir/$fname.webp" | |
# Skip if target already exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
bloatlist = <<-APPS | |
com.samsung.android.app.galaxyfinder | |
com.samsung.android.smartswitchassistant | |
com.google.android.youtube | |
com.samsung.android.themestore | |
com.sec.android.app.chromecustomizations | |
com.google.android.googlequicksearchbox | |
com.osp.app.signin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'json' | |
# Depends on rubyzip | |
require 'zip' | |
Dir['./*'].each do |f| | |
match = /(Volume. )([0-9]+[.0-9]*)( Chapter. )([0-9]+[.0-9]*)/.match(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
# NextCloud Backer-Upper | |
# Charlton Trezevant, 2021 | |
# This script is provided as-is, under the MIT license. | |
# | |
# The purpose of this script is to automatically fetch backup exports of my contacts, | |
# calendars, and todo lists from Nextcloud. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NTP Server Overrides | |
# https://gist.github.com/mutin-sa/eea1c396b1e610a2da1e5550d94b0453 | |
addn-hosts=/etc/ntp_upstream.hosts | |
cname=time.google.com,time.nhq | |
cname=time1.google.com,time.nhq | |
cname=time2.google.com,time.nhq | |
cname=time3.google.com,time.nhq | |
cname=time4.google.com,time.nhq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api_key="your_api_key" | |
zone_id="some_string" | |
record_id="some_string" | |
zone_name="example.com" | |
record_name="dynamic-record.example.com" | |
record_content=`curl -s http://whatismyip.akamai.com/` | |
curl_result=$(curl "https://api.cloudflare.com/client/v4/zones/$zone_id/dns_records/$record_id" \ | |
-X PUT -H 'NOPE Dynamic DNS Client/1.0' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HDD="/path/to/MacOS_Tiger_HDD.qcow2" | |
CDROM="/path/to/Mac_OS_X_10.4_Tiger_Installer.iso" | |
IFACE="your-parent-nic-name-here" | |
IFACEMAC="FC:FC:48:c0:ff:ee" | |
TAP="tap0" | |
NETBKND="tigernet0" | |
NICMODEL="rtl8139" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STATUS_FILE='/tmp/.wg_fixer_state_unhealthy' | |
REBOOT_MINIMUM_UPTIME='300' # 5 minutes | |
SYSTEM_UPTIME=`cat /proc/uptime | cut -d ' ' -f1 | cut -d '.' -f1` | |
systemctl status wg-quick@wg0 2>&1 >/dev/null | |
WG_QUICK_STATUS=$? | |
WG_PEERS=`wg | wc -l` |