Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ofenstichloch on github.
  • I am ofenstichloch (https://keybase.io/ofenstichloch) on keybase.
  • I have a public key whose fingerprint is 3D76 052D 2485 0F52 A8D9 3AC3 ED5F FB69 9DA7 84C6

To claim this, I am signing this object:

@ofenstichloch
ofenstichloch / SpotifyPlaylistAdder.py
Created June 5, 2017 18:34
Mac Spotify add track to playlist script for Touchbar
#Persistent storage file: ~/.conf/SpotifyAPI
#Includes following fields:
# access_token: OAuth access token (current or expired)
# refresh_token: OAuth refresh token to request a new access_token if expired
# client: Spotify Client ID
# clientSecret: Spotify Client Secret
# expire: Added by the script to refresh access token
# userid: Spotify user ID
#This version creates and adds to playlist in form "YYYY MMM" like "2017 Jun"
@ofenstichloch
ofenstichloch / ToggleTrackPad
Last active December 13, 2021 21:36
Simple applescript to toggle the trackpad on a macbook on and off. This script uses the "Turn off Trackpad when USB Mouse is connected" feature of Mac OS. Tested on 10.12.6
tell application "System Events"
tell process "System Preferences"
try
set visible to false
end try
tell application "System Preferences"
delay 1
reveal pane id "com.apple.preference.universalaccess"
end tell
delay 1