Skip to content

Instantly share code, notes, and snippets.

@joelpalmer
joelpalmer / life-changing-funcs.zsh
Last active December 17, 2023 09:22
Zsh functions that change lives
#look up synonym - (word)
# slow and buggy
syn() {
curl -s "https://api.dictionaryapi.dev/api/v2/entries/en/$1" | jq '.[].meanings[].definitions[].synonyms[]'
}
# zd - use zoxide & FZF to find and go to directory
# Not sure why zoxide query -i with FZF doesn't CD
zd() {
local dir
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active August 17, 2025 22:24
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@NicholasBellucci
NicholasBellucci / ScrollingTextView.swift
Last active March 1, 2024 03:37
MacOS swift marquee scrolling text view
import Cocoa
open class ScrollingTextView: NSView {
// MARK: - Open variables
/// Text to scroll
open var text: NSString?
/// Font for scrolling text
open var font: NSFont?
@glasslion
glasslion / vtt2text.py
Last active July 18, 2025 13:46
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.