Skip to content

Instantly share code, notes, and snippets.

View hjdarnel's full-sized avatar
🤠
Slingin' some code!

Henry Darnell hjdarnel

🤠
Slingin' some code!
View GitHub Profile
@hjdarnel
hjdarnel / convert.user.js
Last active February 25, 2025 00:35
Convert MAM time to local time
// ==UserScript==
// @name MAM Convert to Local Time
// @namespace hjdarnel
// @version 0.0.1
// @description Change displayed time and date to your timezone without seconds
// @author hjdarnel
// @match *://*.myanonamouse.net/*
// @grant none
// @icon https://www.myanonamouse.net/favicon.ico
// @downloadURL https://gist.githubusercontent.com/hjdarnel/4cf96197a53f18d64a69c7db058d6a72/raw/convert.user.js
@hjdarnel
hjdarnel / letterboxd-site-hotkeys.user.js
Last active January 9, 2025 17:34
Add site-wide hotkeys to Letterboxd
// ==UserScript==
// @name Letterboxd Site-wide Hotkeys
// @namespace hjdarnel
// @version 0.0.1
// @description Press / anywhere on Letterboxd to search
// @author Henry Darnell https://github.com/hjdarnel
// @match https://letterboxd.com/*
// @downloadURL https://gist.github.com/hjdarnel/e3c3e5c62b7aa27a5cbfddfcf34258cc/raw/letterboxd-site-hotkeys.user.js
// @updateURL https://gist.github.com/hjdarnel/e3c3e5c62b7aa27a5cbfddfcf34258cc/raw/letterboxd-site-hotkeys.user.js
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@hjdarnel
hjdarnel / letterboxd-film-hotkeys.user.js
Last active January 9, 2025 17:34
Add hotkeys to Letterboxd's film detail page, like W for toggle watchlist
// ==UserScript==
// @name Letterboxd Search Hotkey
// @namespace hjdarnel
// @version 0.0.3
// @description Press / anywhere on Letterboxd to search, W to toggle watchlist status
// @author Henry Darnell https://github.com/hjdarnel
// @match https://letterboxd.com/film/*
// @downloadURL https://gist.github.com/hjdarnel/a4d5f24dc7917dc85a407a24386c99b1/raw/letterboxd-film-hotkeys.user.js
// @updateURL https://gist.github.com/hjdarnel/a4d5f24dc7917dc85a407a24386c99b1/raw/letterboxd-film-hotkeys.user.js
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@hjdarnel
hjdarnel / focus-aws-sso-code-confirm-allow.user.js
Created March 12, 2024 16:11
GreaseMonkey/TamperMonkey script to put input focus on the Confirm/continue button for AWS CLI SSO login
// ==UserScript==
// @name AWS SSO Focus Confirm and Continue button
// @version 1.0.1
// @description Focus authorize allow button when confirming AWS CLI SSO code
// @downloadURL https://gist.github.com/hjdarnel/d014de4c9f9361ac656a441525f6b503/raw/focus-aws-sso-code-confirm-allow.user.js
// @updateURL https://gist.github.com/hjdarnel/d014de4c9f9361ac656a441525f6b503/raw/focus-aws-sso-code-confirm-allow.user.js
// @author Henry Darnell @hjdarnel
// @match https://device.sso.us-east-1.amazonaws.com/*
// @icon https://www.google.com/s2/favicons?domain=awsapps.com
// @grant none
// ==UserScript==
// @name AWS SSO Start Page
// @version 1.2.0
// @description Expand all account options
// @author Gregory Seidman @gregory-seidman
// @downloadURL https://gist.github.com/hjdarnel/c09cc38f9348f4d5bf8985ff8d42f463/raw/expand-sso-aws-login-options.user.js
// @updateURL https://gist.github.com/hjdarnel/c09cc38f9348f4d5bf8985ff8d42f463/raw/expand-sso-aws-login-options.user.js
// @match https://*.awsapps.com/start*
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com
// @grant none
// ==UserScript==
// @name AWS Close SSO success
// @version 1.0.7
// @description Close the tab after successfully logging in via SSO
// @downloadURL https://gist.github.com/hjdarnel/6163bafb3595d3fd7a0b6e42e4db0248/raw/aws_close_sso_success.user.js
// @updateURL https://gist.github.com/hjdarnel/6163bafb3595d3fd7a0b6e42e4db0248/raw/aws_close_sso_success.user.js
// @author Gregory Seidman @gregory-seidman
// @match https://*.awsapps.com/start/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com
// @grant window.close
@hjdarnel
hjdarnel / focus-aws-sso-authorize-allow.user.js
Last active March 19, 2024 15:34 — forked from gregory-seidman/focus-aws-sso-authorize-allow.user.js
GreaseMonkey/TamperMonkey script to put input focus on the Allow button for AWS CLI SSO login
// ==UserScript==
// @name AWS SSO Focus Allow button
// @version 1.0.5
// @description Focus authorize allow button when confirming AWS CLI SSO login
// @downloadURL https://gist.github.com/hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02/raw/focus-aws-sso-authorize-allow.user.js
// @updateURL https://gist.github.com/hjdarnel/ef8417a63d2d5fb9e381e0301dc4ac02/raw/focus-aws-sso-authorize-allow.user.js
// @author Gregory Seidman @gregory-seidman
// @match https://*.awsapps.com/start/*
// @icon https://www.google.com/s2/favicons?domain=awsapps.com
// @grant none
@hjdarnel
hjdarnel / standup.sh
Created January 30, 2020 22:36
Slack myself standup from the current day (for tomorrow's reference)
# Send a Slack message to any channel with your commits from the previous 24 hours
# add this to crontab -e
# requires legacy token https://api.slack.com/custom-integrations/legacy-tokens
# requires channel id replacement
# requires git standup to be installed https://github.com/kamranahmedse/git-standup
#!/bin/sh
cd /Users/henry
standup=$(git standup -m 3 -s -D local | sed -e 's/<Henry Darnell>//g' -e 's/\/Users\/henry\///g')
curl -X POST -H 'Authorization: Bearer ---REDACTED LEGACY TOKEN---' \
do shell script "pmset -g batt | grep InternalBattery | column -t"
set x to the result
set percentage to word 6 of x
set state to word 7 of x
set t1 to word 8 of x
set t2 to word 9 of x
set remaining to the word 10 of x
if remaining contains "remaining" then
if state is "discharging" then
return percentage & "%"
[
["f", "Show next/latest diffs", "setProposedDiffBounds()"],
["n", "Next unreviewed file", "nextUnreviewedFile()"],
["p", "Previous unreviewed file", "prevUnreviewedFile()"],
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"],
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"],
["shift+n", "Next changed file", "nextChangedFile()"],
["shift+p", "Previous changed file", "prevChangedFile()"],
[null, "Next visible file", "nextVisibleFile()"],