Skip to content

Instantly share code, notes, and snippets.

@mjquinn21
mjquinn21 / Pause Media on AirPods Disconnect.rtf
Last active April 18, 2021 16:17
Applescript to pause media from YouTube and Spotify. Works with Google Chrome for YouTube and Chrome and the desktop client for Spotify. Useful to run with Tooth Fairy to pause music when AirPods are disconnected.
How to Use This Script
1. Open Finder
2. Hit ⌘⇧L (Command + Shift + L)
3. Locate the Scripts folder
4. Move Stop_Media_When_AirPods_Disconnect_For_Tooth_Fairy.scpt to ~/Library/Scripts/
5. Open Tooth Fairy preferences
6. Select your AirPods and click “Advanced”
7. Make sure that “Run shell script after disconnecting” is ticked
8. Paste this in there:
@topjor
topjor / wg.sh
Created February 7, 2019 20:44
Wireguard firmware sustain script
#!/bin/bash -e
BOARD=e300
if [ ! $(dpkg-query --show wireguard) ]; then
tag=$(curl "https://api.github.com/repos/Lochnair/vyatta-wireguard/releases" | jq -r '.[0].tag_name')
deb_url="https://github.com/Lochnair/vyatta-wireguard/releases/download/$tag/wireguard-$BOARD-$tag-1.deb"
curl -L -o "/tmp/wireguard-$BOARD-$tag.deb" "$deb_url"
dpkg -i "/tmp/wireguard-$BOARD-$tag.deb"
rm "/tmp/wireguard-$BOARD-$tag.deb"
source /opt/vyatta/etc/functions/script-template
configure
@sebsto
sebsto / gist:6af5bf3acaf25c00dd938c3bbe722cc1
Last active May 17, 2024 12:40
Start VNCServer on Mac1 EC2 Instance
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@kconner
kconner / macOS Internals.md
Last active May 25, 2024 19:26
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options: