Vol. 1, Issue #1 in the "Daniel Fucking Nerd-Sniped Me" Series
This file contains hidden or 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
SYSTEM_LAN_IFACE="eth0" | |
VPN_CLIENT_IFACE="tun0" | |
DEST_IP="10.173.204.63" | |
FWDED_PORT="22" | |
SOURCE_NET_WHITELIST="10.0.2.0/24,10.0.3.0/24" | |
get_iface_ip() { | |
IP=`ip addr show $1 | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"` | |
if [[ $? -ne 0 ]]; | |
then |
This file contains hidden or 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
# frozen_string_literal: true | |
require 'exif' | |
require 'fileutils' | |
require 'shellwords' | |
formats = ['.jpg', '.png', '.jpeg', '.mov', '.mp4', '.m4v'] | |
def update_exif(year, month, day, f) | |
f = f.strip |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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' \ |