Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
Boo! Haha, just kidding. Okay how do I turn off dictation Siri end please stop h

samhenrigold

👻
Boo! Haha, just kidding. Okay how do I turn off dictation Siri end please stop h
View GitHub Profile
@samhenrigold
samhenrigold / De-dobe.scpt
Last active May 4, 2022
Kill all Adobe CC daemons on app quit
View De-dobe.scpt
-- Original script by Ted Wrigley (https://stackoverflow.com/questions/63786497/is-it-possible-to-run-an-automator-workflow-when-a-program-exits/69959340#69959340)
use framework "AppKit"
use scripting additions
property NSWorkspace : class "NSWorkspace"
property whitelist : {"com.adobe.ARM", "com.adobe.Acrobat", "com.adobe.Acrobat.Pro", "com.adobe.AdobePremierePro", "com.adobe.AfterEffects", "com.adobe.InCopy", "com.adobe.InDesign", "com.adobe.InDesignServer", "com.adobe.Lightroom2", "com.adobe.Lightroom3", "com.adobe.Muse.application", "com.adobe.Photoshop", "com.adobe.PhotoshopElements", "com.adobe.Reader", "com.adobe.bridge3", "com.adobe.bridge4", "com.adobe.bridge4.1", "com.adobe.dreamweaver-15.0", "com.adobe.dreamweaver-15.1", "com.adobe.dreamweaver-16.0", "com.adobe.dreamweaver-16.1", "com.adobe.estoolkit-3.0", "com.adobe.estoolkit-3.5", "com.adobe.estoolkit-3.6", "com.adobe.flash", "com.adobe.illustrator", "com.adobe.photodownloader", "com.adobe.pse11editor", "com.adobe.pse12editor", "com.adobe.pse9ed
@samhenrigold
samhenrigold / medium-to-scribe.js
Last active Apr 24, 2022
UserScript to redirect medium.com articles to scribe.rip
View medium-to-scribe.js
// ==UserScript==
// @name Medium to Scribe
// @description Redirects Medium.com articles to scribe.rip
// @match *://*/*
// @exclude /^https?://(www\.)?medium\.com/((\?.*)|((m|about|creators|membership)/.*))$/
// @run-at document-end
// @version 1.2.4
// @updateURL https://gist.githubusercontent.com/samhenrigold/4a082dde823bc3cb62e43a2fc2b12b8e/raw/medium-to-scribe.js
// ==/UserScript==
View .funky
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.funky` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# General UI/UX #
View gist:887ebeb947fe0844e6e58e91e2f86d6c

Check all checkboxes

$$('input[type="checkbox"').map(i => i.checked = true)

UNcheck all checkboxes

$$('input[type="checkbox"').map(i => i.checked = false)

Allow all text to be selectable

document.querySelectorAll('*').style.userSelect = 'auto';

Extract all links from website to a table