Skip to content

Instantly share code, notes, and snippets.

View xala3pa's full-sized avatar
🏠
Working from home

Álvaro Salazar xala3pa

🏠
Working from home
View GitHub Profile
@xala3pa
xala3pa / editor.css
Created May 31, 2012 13:53 — forked from nakhli/editor.css
Backbone.js tutorial - Part 1 - www.javageneration.com
.shape{
height: 100%;
width: 100%;
}
.circle {
border-radius: 50%/50%;
-moz-border-radius: 50%/50%;
-webkit-border-radius: 50%/50%;
}
.hide {
@xala3pa
xala3pa / robot.js
Created December 7, 2012 18:21
3pa
//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(100);
@xala3pa
xala3pa / robot.js
Created December 7, 2012 18:29
3pa win!
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(150);
robot.rotateCannon(360);
robot.turn(20)
@xala3pa
xala3pa / robot.js
Created December 7, 2012 18:46 — forked from mauriciofaustino/robot.js
mRC
var Robot = function(robot) {
this.direction = 1;
this.found = false;
this.loseNum = 0;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if(this.found) {
robot.turnGunRight(15 * this.direction);
@xala3pa
xala3pa / robot.js
Created December 7, 2012 18:50 — forked from kjaku/robot.js
try me punk
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)
@xala3pa
xala3pa / robot.js
Created December 7, 2012 18:52 — forked from kjaku/robot.js
try me punk - fork
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)
@xala3pa
xala3pa / robot.js
Created December 7, 2012 22:14 — forked from kjaku/robot.js
Bubu
var Robot = function(robot) {
// var robot = ev.robot;
}
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.rotateCannon(360);
robot.turn(360)
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
import spock.lang.Specification;
import com.xala3pa.Calculator
class calculatorSpec extends Specification {
def "Add 3 and 4 to get the correct result"() {
given: "A calculator"
def calculator = new Calculator()
when: "Add 3 and 4"
class Math extends Specification {
def "maximum of two numbers"(int a, int b, int c) {
expect:
Math.max(a, b) == c
where:
a | b | c
1 | 3 | 3
7 | 4 | 4
0 | 0 | 0