Skip to content

Instantly share code, notes, and snippets.

@rafaelcaricio
rafaelcaricio / dabblet.css
Created May 5, 2012 01:47
Infinite carrossel only CSS / HTML
@keyframes restart-next {
0% {
margin-left: -400px; /* =-2*box.width */
}
100% {
margin-left: -600px; /* =-3*box.width */
}
}
@keyframes restart-back {
0% {
@keyframes restart-next {
0% {
margin-left: -400px; /* =-2*box.width */
}
100% {
margin-left: -600px; /* =-3*box.width (last box)*/
}
}
@keyframes restart-back {
0% {
@import url(http://fonts.googleapis.com/css?family=Trochut);
ul {
list-style: none;
margin: 0;
padding: 0;
}
.carrossel {
position: relative;
width: 939px;
@rafaelcaricio
rafaelcaricio / insertion_sort.py
Created September 11, 2012 11:55
Insertion sort
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def insertion_sort(array):
size = len(array)
if size > 1:
for i in xrange(size):
j = i
@rafaelcaricio
rafaelcaricio / robot.js
Created November 15, 2012 15:49
My little robot
//FightCode can only understand your robot
//if its class is called robotClass
var robotClass = function(){
};
robotClass.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
robot.rotateCannon(360);
@rafaelcaricio
rafaelcaricio / robot.js
Created December 1, 2012 03:31
MOthefucker mother
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
this.stop= false;
this.step = 1;
this.bla = true;
};
Robot.prototype.onIdle = function(ev) {
@rafaelcaricio
rafaelcaricio / robot.js
Created December 3, 2012 13:24
Little Guy
function Robot(robot) {
this.countDown = 0;
this.countTurnFast = 0;
robot.clone();
this.myRobotId = null;
this.myCloneId = null;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@rafaelcaricio
rafaelcaricio / robot.js
Created December 3, 2012 15:03 — forked from victorlcampos/robot.js
Bartorista
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(50);
robot.turn(90);
robot.rotateCannon(10);
robot.rotateCannon(-20);
@rafaelcaricio
rafaelcaricio / robot.js
Created December 3, 2012 15:03 — forked from victorlcampos/robot.js
Bartorista
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(50);
robot.turn(90);
robot.rotateCannon(10);
robot.rotateCannon(-20);
@rafaelcaricio
rafaelcaricio / robot.js
Created December 4, 2012 21:01
Mother of Gods
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.clone();
this.ascending = true;
robot.ahead(100);
};