Skip to content

Instantly share code, notes, and snippets.

View Swipe650's full-sized avatar
🏠
Retired - now doing interesting IT stuff

SwitchToLinux Swipe650

🏠
Retired - now doing interesting IT stuff
View GitHub Profile
@Swipe650
Swipe650 / toggle_res
Last active August 11, 2017 07:04
toggle resolution between 1680x1050 & 1440x900
#!/bin/bash
high=$(xrandr | grep 'VGA-1 connected 1680x1050' | cut -c 1-25)
low=$(xrandr | grep 'VGA-1 connected 1440x900' | cut -c 1-24)
if [ "$high" == "VGA-1 connected 1680x1050" ]; then
xrandr -s 1440x900 #&& sed -i 's/^//' ~/.conky/conkyrc
fi
if [ "$low" == "VGA-1 connected 1440x900" ]; then
@Swipe650
Swipe650 / Unlock
Created August 2, 2017 10:35
Unlock mac via ssh
osascript -e 'tell application "system events" to keystroke return'
osascript -e 'tell application "system events" to keystroke "password"'
osascript -e 'tell application "system events" to keystroke return'