Skip to content

Instantly share code, notes, and snippets.

@johanneswuerbach
johanneswuerbach / sauce_connect_setup.sh
Last active August 29, 2015 14:13 — forked from santiycr/sauce_connect_setup.sh
Setup a Sauce Connect 3 tunnel
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"
@johanneswuerbach
johanneswuerbach / robot.js
Created December 17, 2012 11:37
DeathAng3l2
// Conventions:
// We use angles in degrees in clock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@johanneswuerbach
johanneswuerbach / README.markdown
Created May 16, 2012 16:43 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
var OA_output = new Array();
OA_output['applifier_bar'] = '';
OA_output['applifier_bar'] += "<"+"div id=\'ox_789690cfb745a99a6d31e30dec8311b2\' style=\'display: inline;\'><"+"img src=\'https://lbopx.plinga.de/www/images/1x1.gif\' alt=\'\' title=\'\' border=\'0\' /><"+"/div>\n";
OA_output['applifier_bar'] += "<"+"script type=\'text/javascript\'><"+"!--// <"+"![CDATA[\n";
OA_output['applifier_bar'] += "var ox_swf = new FlashObject(\'https://plopx.s3.amazonaws.com/120301_FB_FF_120x520_ag.swf\', \'Advertisement\', \'120\', \'520\', \'4\');\n";
OA_output['applifier_bar'] += "ox_swf.addParam(\'allowScriptAccess\',\'always\');\n";
OA_output['applifier_bar'] += "ox_swf.write(\'ox_789690cfb745a99a6d31e30dec8311b2\');\n";
OA_output['applifier_bar'] += "if (ox_swf.installedVer.versionIsValid(ox_swf.getAttribute(\'version\'))) { document.write(\"<"+"div id=\'beacon_4aeeb2a197\' style=\'position: absolute; left: 0px; top: 0px; visibility: hidden;\'><"+"img src=\'https://lbopx.plinga.de/www/delivery/lg.php?bannerid=5473&a
function getOpenXBannerCode(oXZones,plingaApi) {
var oXLoc=(location.protocol=='https:'?'https':'http') + "://lbopx.plinga.de/www/delivery/spc.php";
var oXZoneIds ='';
$.each(oXZones, function(key, value) {
oXZoneIds += escape(key+'=' + value + "|");
});
oXLoc += "?zones="+oXZoneIds;
oXLoc += (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));