Skip to content

Instantly share code, notes, and snippets.

View anthonybaldwin's full-sized avatar

anthonybaldwin

View GitHub Profile
@anthonybaldwin
anthonybaldwin / .zshrc
Created September 4, 2019 22:34
.zshrc
## Weather ##
# w 93101
# w "blue springs"
# weather "kansas city"
alias weather='w() {
if [ $1 ]; then
curl wttr.in/$1
else
curl wttr.in
@anthonybaldwin
anthonybaldwin / update.sh
Created November 12, 2019 02:02
Download most recent Chromedriver and update version file
#!/usr/bin/env bash
# Version
CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
# Remove existing
rm chromedriver
rm chromedriver-mac
rm chromedriver.exe
@anthonybaldwin
anthonybaldwin / ifttt.js
Last active April 4, 2021 02:20
IFTTT Filter for Discord Twitter Webhook
const t12To24 = function(time: any) { //time=12:30PM
time = time.replace(/[AP]/, " $&"); //time=12:30 PM
let [t, p] = time.split(' '); //t=12:30, p=PM
let [h, m] = t.split(':'); //h=12, m=30
if (h === '12') {h = '00';} //h=00
if (p === 'PM') {h = parseInt(h, 10) + 12;} //h=12
return `${h}:${m}`; //12:30
}
let date = Trigger.CreatedAt; //date="April 20, 2021 at 04:20PM"
@anthonybaldwin
anthonybaldwin / Disable Office Keys.ahk
Created May 28, 2023 03:29
AHK v2 Script to Disable Office/Hyper Key Shortcuts on Windows 11
; Original: https://web.archive.org/web/20230528022520/https://www.howtogeek.com/445318/how-to-remap-the-office-key-on-your-keyboard/
; Converted using: https://github.com/mmikeww/AHK-v2-script-converter
; Registry fix:
; Add: REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32
; Remove: REG DELETE HKCU\Software\Classes\ms-officeapp\Shell
; To use:
; - Run the registry ADD fix above via Administrator PowerShell
; - Run this script on StartUp (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp) by: