Skip to content

Instantly share code, notes, and snippets.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready( function(){
if ($.browser.webkit) {
window.location = 'http://www.webkit.org/';
}
else if ($.browser.msie) {
@lushone
lushone / robot.js
Created December 3, 2012 20:26
LUSH
//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.ahead(10);
@lushone
lushone / robot.js
Created December 3, 2012 20:34 — forked from samshull/robot.js
destroyer of worlds
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
@lushone
lushone / robot.js
Created December 3, 2012 20:34
W00t #1 YEAH!!!! (Zolmesiter)
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@lushone
lushone / robot.js
Created December 3, 2012 20:35 — forked from cezarsa/robot.js
Simple Wall Robot
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@lushone
lushone / Responsive
Created December 14, 2012 17:14 — forked from anonymous/Responsive
.visible-desktop {
display: inherit;
}
.visible-tablet {
display: none !important;
}
.visible-mobile {
display: none !important;
.visible-desktop {
display: inherit;
}
.visible-tablet {
display: none !important;
}
.visible-mobile {
display: none !important;
@lushone
lushone / tall_box.css
Last active December 13, 2015 23:19 — forked from anonymous/tall_box.css
Specify a height on line 104.
#ad {
position:relative;
float:left;
margin: 0 1% 0 0;
top: 200px;
width:200px;
}
#main {
top: 15px;
@lushone
lushone / Anti-Ad-Block
Created March 14, 2013 20:50
Bypass browser ad blockers. Cripples Ad-Block Plus & Ghostery on Chrome.
$(function() {
if ($('.displayads').length && $('.displayads').height() == 0) {
alert('It seems you are blocking the ads with AdBlock or a similar tool. Please disable it and try reload the page.');
$('body').empty();
}
});
@lushone
lushone / pythonhttpserver
Created April 5, 2013 09:59
Bash function to call a python HTTP server instead of typing out the long winded method. Includes support for passing in port numbers. Port 8000 by default, obviously.
httpserver() {
portNum=$1
if [ -z "$1" ]
then
python -m SimpleHTTPServer 8000
else
python -m SimpleHTTPServer $portNum
fi
}