Skip to content

Instantly share code, notes, and snippets.

@artkay
artkay / Toggle Natural Scrolling
Created April 16, 2025 02:38
Put into ~/Library/Scripts for a fast way of switching the natural scrolling back & forth. Works with macOS Sequioa
-- Open trackpad settings
open location "x-apple.systempreferences:com.apple.Trackpad-Settings.extension"
tell application "System Events"
tell application process "System Settings"
tell group 1 of group 2 of splitter group 1 of group 1 of window 1
-- Select "Scroll & Zoom" tab
repeat until tab group 1 exists
delay 0
tap "hashicorp/tap"
brew "asdf"
brew "awscli"
brew "bash"
brew "bash-completion"
brew "bat"
brew "curl"
brew "gh"
brew "git"
@artkay
artkay / gitprompt
Created April 16, 2025 02:12
git repo shell prompt
#!/bin/bash
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
parse_git_repo_name() {
if git remote get-url origin > /dev/null 2>&1
then
basename $(git remote get-url origin 2> /dev/null) .git
fi
}

Keybase proof

I hereby claim:

  • I am artkay on github.
  • I am artkay (https://keybase.io/artkay) on keybase.
  • I have a public key ASD-lDO3cgDDaTdmMwk1LoQSUNXVmZzwjgIzkP62jnl50go

To claim this, I am signing this object: