Skip to content

Instantly share code, notes, and snippets.

@olibob
olibob / gist:4239990
Created December 8, 2012 11:53 — forked from padolsey/gist:527683
javascript: detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@olibob
olibob / hidpi.txt
Created December 7, 2013 19:39 — forked from simX/hidpi.txt
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@olibob
olibob / jenkins-workflow.groovy
Created November 19, 2015 17:59 — forked from cyrille-leclerc/jenkins-workflow.groovy
Jenkins Docker Workflow - Deploy Game Of Life to Amazon EC2 Container Service / ECS
docker.withRegistry('', 'dockerhub-credentials-cleclerc') {
writeFile file: "${pwd()}/.m2/settings.xml", text: "<settings><localRepository>${pwd()}/.m2/repo</localRepository></settings>"
stage 'Build Web App'
docker.image('cloudbees/java-build-tools:0.0.5').inside {
git 'https://github.com/cyrille-leclerc/game-of-life.git'
sh "mvn -B -V -s ${pwd()}/.m2/settings.xml clean package"
}