Skip to content

Instantly share code, notes, and snippets.

@yadue
yadue / robot.js
Created December 4, 2012 13:23 — forked from fabiopimentel/robot.js
[CAELUM TEAM]Megatron
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
@yadue
yadue / gist:1087626
Created July 17, 2011 14:12 — forked from kosso/gist:1059705
Google PlusBar..
/*
The code for the bookmarklet:
You create bookmarklets with a href javascript: links.
If you don't know how to do this, simply copy/paste one you might already have in your toolbar and
then edit the url properies with this long line below:
*/
javascript:(function(){var%20included%20=%20false,openbar%20=%20false,src%20=%20"http://YOUR_DOMAIN/YOUR_SCRIPT.JS";var%20isIncluded%20=%20(function(){var%20scripts%20=%20document.getElementsByTagName('script');for(var%20i=0;i<scripts.length;i++){if(scripts[i].src%20==%20src){bar_toggle();%20return%20true;}}return%20false;})();if(isIncluded){%20%20}else{if(included){return%20false;}included%20=%20true;var%20head%20=%20document.getElementsByTagName("head")[0]%20||%20document.documentElement,script%20=%20document.createElement("script");script.type%20=%20"text/javascript";script.async%20=%20true;script.src%20=%20src;head.insertBefore(%20script,%20head.firstChild%20);}})();