Skip to content

Instantly share code, notes, and snippets.

@jachwe
jachwe / init-system.sh
Last active December 19, 2015 09:11
Setup new system with basic apps
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install android-sdk
brew install sshpass
brew install autojump
brew install sqlite
brew install subversion
brew install brew-cask
brew install node
brew install ssh-copy-id
@jachwe
jachwe / Gruntfile.js
Created September 14, 2015 13:18
Register a grunt taks to start a local mysql server for development.
grunt.registerTask('mysql', 'Run MYSQL Server',
function() {
var done = this.async();
var mysql = spawn('mysql.server', ['restart']);
done();
}
);
@jachwe
jachwe / snapdesk.sh
Last active September 14, 2015 13:19
Little snippet to capture the current screen in OSX and set it as Background Picture. Works for multiple Desktops by just ignoring errors. :-) Useful if you got a fullscreen App that might crash and have a fallback with a still image while restarting. I use this quite often in a tradefair context... have fun!
# usage: ./snapdesk.sh user@localhost
TARGET=$1
echo $TARGET;
ssh $TARGET << 'ENDSSH'
mkdir -p ~/snapdesk;
screencapture ~/snapdesk/1.png ~/snapdesk/2.png ~/snapdesk/3.png ~/snapdesk/4.png ~/snapdesk/5.png;
osascript -e 'tell application "System Events" to set picture of desktop 1 to "~/snapdesk/1.png"'
osascript -e 'tell application "System Events" to set picture of desktop 2 to "~/snapdesk/2.png"'