Skip to content

Instantly share code, notes, and snippets.

View jwmann's full-sized avatar
🎯
Focusing

James W Mann jwmann

🎯
Focusing
View GitHub Profile
@jwmann
jwmann / ToggleOutputDevice.scpt
Created March 3, 2016 02:03
This is an AppleScript to toggle between 2 Sound Output Devices. Set your own Devices to toggle on lines 32 and 33
# Tell our specifc panel options to wake up.
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
end tell
# Save our Current Output Device as well as a List of Available Output Devices.
tell application "System Events"
tell process "System Preferences"
tell window "Sound"
tell tab group 1
@jwmann
jwmann / .profile
Last active September 18, 2016 21:25
Bash Functions for quickly setting the appropriate user for the git repo
# GIT USER PROFILE SETTING / SWITCHING
# This will strip the current static User from the current repo and Include an external User profile.
# This function relies on: Git, A Git Repo, a config file located in ~/config/git/profilename.user.config
# Format must be profilename.user.config
# Usage: gituser home => ~/config/git/home.user.config
# Usage: gituser "Work GitHub" => ~/config/git/Work Github.user.config
gituser() {
# Sanity check
if [ -z "$(which git)" ]
then