Skip to content

Instantly share code, notes, and snippets.


Klemens Gordon k9ordon

View GitHub Profile
View gist:582281
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// if (ie) { alert('IE ' + ie); } // else ie version is not a number;
// if(!ie) { alert ('IE is Kryptonite.'); }
var ie = (function(){
var div = document.createElement('div');
k9ordon / gpxImport.php
Created Jul 16, 2012
exports nike+ runs to gpx
View gpxImport.php
strt importing gpx files ...
require_once 'lib/init.php'; // init $n stuff (login)
$dir = "import";
$runs = $n->activities();
foreach($runs->activities as $a) {
k9ordon / gist:4762681
Created Feb 12, 2013
8tracks liked tracks to plain
View gist:4762681
$( "li.track" ).each(function( index ) {
var track = $('.t', this).text(),
artist = $('.a', this).text().replace("&","");
$(this).text(artist + ' - ' +track);
View click_allow.scpt
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
tell process "SecurityAgent"
click button "Allow" of group 1 of window 1
end tell
delay 0.2
end repeat
end tell
These two files should help you to import passwords from mac OS X keychains to 1password.
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
# Originally from "Automatically download Chromium nightly builds"
LATEST=`curl -s`
CURRENT=`defaults read /Applications/ SCMRevision 2>/dev/null`
PROCESSID=`ps ux | awk '/Chromium/ && !/awk/ {print $2}'`
if [[ $LATEST -eq $CURRENT ]]; then
k9ordon /
Last active Aug 29, 2015
Homebrew on OSX 10.10 Yosemite

#Fix your homebrew installation




#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
k9ordon /
Last active Aug 29, 2015
OSX 10.10 Yosemite - Compatibility list

A short list on osx yosemite compatibility from my setup

System Version: OS X 10.10 b2 (14A261i) Model Identifier: MacBookAir6,1


  • atom
  • safari
  • little snitch
  • bartender
View gist:19e284a8a3a285415e5a
var init = function() {
var next = function() {
if(!steps[idx]) process.exit();
View gist:00923fe3b13525948c37
Two Mics - Bluebird
Celldweller - Through the Gates
Celldweller - Pulsar
Dj Gontran - Moby Glitch
Krubb Wenkroist - Bleach
Di Dubai - Vodka Aspirin
Di Gontran - Chemistry
AWOLNATION - Burn it Down
MuteMath - Blood Pressure
You can’t perform that action at this time.