Skip to content

Instantly share code, notes, and snippets.

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO (YES to enable)
python /Applications/CouchPotatoServer/CouchPotato.py --daemon
python /Applications/Headphones/Headphones.py -d
python /Applications/Sick\ Beard/sickbeard.py -d
exit
tell application "System Events" to set FrontAppName to name of first process where frontmost is true
if FrontAppName is "Logic Pro X" then
tell application "System Events"
keystroke "k" using {control down}
end tell
else
tell application "Logic Pro X" to activate
tell application "System Events"
keystroke "k" using {control down}
delay 0.5
@smithjw
smithjw / KeyRemap4MacBook Double Modifier
Last active December 21, 2015 13:49
Example of how to map a double-tap of a modifier (⇧ / ^ / ⌥ / ⌘) to another keyboard shortcut. In this example ⇧^⌥⌘0
<item>
<name>Double Control</name>
<appendix>Doubletap ^ to ⇧^⌥⌘0</appendix>
<identifier>private.smithjw.DoubleControl</identifier>
<autogen>
--DoublePressModifier--
KeyCode::CONTROL_L,
KeyCode::CONTROL_L,
KeyCode::KEY_0, ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L
</autogen>
Breaking Bad - S05E13 - To'hajiilee.mkv
@smithjw
smithjw / content
Last active August 29, 2015 13:56
tell application "Alfred 2" to search
tell application "System Events"
keystroke "ch"
keystroke return
key code 125
key code 125
keystroke return
end tell
@smithjw
smithjw / gist:8c3fca9cb3baadc0ffbe
Created October 25, 2014 10:48
Yosemite Network Fix
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
{
"rooms":[
{
"name":"Room One",
"status":0,
"adr":"Building C",
"current_meeting": {
"name": "Standup",
"start_time":"10am",
"end_time":"11am"
@smithjw
smithjw / Microsoft_Office_Insider_Status.sh
Created March 30, 2022 22:44
Jamf EA - Microsoft Office Insider Status
#!/bin/bash
plistbuddy=/usr/libexec/PlistBuddy
logged_in_user=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
plist="/Users/$logged_in_user/Library/Preferences/com.microsoft.autoupdate2.plist"
field_name=":ChannelName"
if [[ -f "$plist" ]]; then
# Check if user is on Beta or Preview Track
field_value=$($plistbuddy -c "Print $field_name" "$plist")
@smithjw
smithjw / gettin_values.sh
Created April 7, 2022 23:18
Bash JSON Enrolment snippet
#!/bin/bash
echo_logger() {
log_folder="${log_folder:=/private/var/log}"
log_name="${log_name:=log.log}"
mkdir -p $log_folder
echo -e "$(date) - $1" | tee -a $log_folder/$log_name
}