Skip to content

Instantly share code, notes, and snippets.

View orian's full-sized avatar

Paweł Szczur orian

View GitHub Profile
@orian
orian / robot.js
Created December 4, 2012 01:08
ZawiszaCzarny
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
this.lastHitAngle = 0;
this.radius = 20;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@orian
orian / dart-bash.sh
Last active October 6, 2015 16:18
Quick and dirty script to automagically download and unpack Dart editor.
# just add copy&paste to your .bashrc
# require wget, unzip
DART_PKG_NAME="darteditor-linux-64.zip"
#If variable is not defined, set variable.
check-env-var() {
X=$1
if [ -z "${!X}" ]; then
export $X=$2
echo "export $X=${!X}"