Skip to content

Instantly share code, notes, and snippets.

View zaxbux's full-sized avatar
👨‍💻

Zach Schneider zaxbux

👨‍💻
View GitHub Profile
@zaxbux
zaxbux / README.md
Last active October 15, 2024 20:29
1Password chrome extension settings highlight URLs

categoryId

  • sectionGeneral
  • sectionSecurity
  • sectionAutofill
  • sectionAccountsandvaults
  • sectionNotifications
  • sectionWatchtower
  • sectionAppearanceAndShortcuts
  • sectionIntegrations
  • sectionInsiders

Product Keys

Edition Type Key
Windows 10 Pro Default RHGJR-N7FVY-Q3B8F-KBQ6V-46YP4
Windows 10 Pro N Default RHGJR-N7FVY-Q3B8F-KBQ6V-46YP4
Windows 10 Pro RTM VK7JG-NPHTM-C97JM-9MPGT-3V66T
Windows 10 Pro N RTM 2B87N-8KFHP-DKV6R-Y2C8J-PKCKT
Windows 10 Enterprise RTM XGVPP-NMH47-7TTHJ-W3FW7-8HV2C
Windows 10 Enterprise N RTM WGGHN-J84D6-QYCPR-T7PJ7-X766F
#!/bin/bash
indent() { sed 's/^/ /'; }
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
# encode special characters per RFC 3986
urlencode() {
local LC_ALL=C # support unicode = loop bytes, not characters
local c i n=${#1}
for (( i=0; i<n; i++ )); do
c="${1:i:1}"
@zaxbux
zaxbux / getMacScreensaver.sh
Created May 12, 2024 07:39
Get macOS Screensaver and Settings
#!/bin/bash
loggedInUser=$(stat -f "%Su" /dev/console)
osVersion=$(/usr/bin/sw_vers -productVersion)
osVerMajor=$(echo "$osVersion" | /usr/bin/awk -F"." '{print $1}')
#osVerMinor=$(echo "$osVersion" | /usr/bin/awk -F"." '{print $2}')
#osVerPatch=$(echo "$osVersion" | /usr/bin/awk -F"." '{print $3}')
indent() { sed 's/^/ /'; }
@zaxbux
zaxbux / Extensions.md
Last active November 15, 2024 18:20
Mac sysadmin
@zaxbux
zaxbux / clean_downloads.sh
Created March 28, 2024 00:11
Delete user downloads that are older than 28 days (macOS)
#!/bin/bash
sudo -u $(stat -f "%Su" /dev/console) /bin/bash <<'END'
# Move files to user's trash
function trash() {
if [[ $# ]]; then
a=()
for f in "$@"; do a+=("$(realpath "$f")"); done
f=$(printf "\",POSIX file \"%s" "${a[@]}")\"
@zaxbux
zaxbux / README.md
Created October 5, 2023 07:45
ESP32-C6-DevKitC-1

Addressable RGB LED

light:
  - platform: esp32_rmt_led_strip
    id: led_gpio8
    name: "${friendly_name} Light"
    pin: GPIO8
    num_leds: 1
 rmt_channel: 0
@zaxbux
zaxbux / tubezb-cc2652p2-ethusb-2023.yaml
Created September 12, 2023 02:29
TubeZB CC2652P2 Ethernet/USB Coordinator ESPHome BLE Proxy
substitutions:
name: tubezb-cc2652p2-ethusb-2023
friendly_name: TubesZB and Bluetooth Proxy
esphome:
name: ${name}
friendly_name: ${friendly_name}
esp32:
board: esp32doit-devkit-v1
@zaxbux
zaxbux / gdocs.xml
Last active June 12, 2024 11:40
File Types
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.google-apps.document">
<comment>Google Docs</comment>
<glob pattern="*.gdoc" />
</mime-type>
<mime-type type="application/vnd.google-apps.drawing">
<comment>Google Drawings</comment>
<glob pattern="*.gdraw" />
</mime-type>
@zaxbux
zaxbux / README.md
Last active September 10, 2023 10:20
OpenSprinkler, Rust, Raspberry Pi