Skip to content

Instantly share code, notes, and snippets.

@mutantcornholio
mutantcornholio / btt_mute.scpt
Created May 14, 2020
BetterTouchTool mute toggle
View btt_mute.scpt
tell application "BetterTouchTool"
if input volume of (get volume settings) = 0 then
update_trigger "E932FDB1-172A-4D4A-A710-5494CC41AB3D" json "{
\"BTTIconData\": \"TU0AKgAAQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
View svn-stash
#!/usr/bin/env bash
set -e
if [[ $(uname) == "Darwin" ]]; then
stat_args="-f%m"
date_args="-r "
elif [[ $(uname) == "Linux" ]]; then
stat_args="-c %Y"
date_args="-d @"
else
View serve.go
/*
Simple static file server in go
Usage:
-p="8100" port to serve on
-d="." the directory of static files to host
-c enable cache
-4 ipv4 only
-6 ipv6 only
Navigating to http://localhost:8100 will display the index.html or directory