Skip to content

Instantly share code, notes, and snippets.

View victorlcampos's full-sized avatar

Victor Campos victorlcampos

View GitHub Profile
@victorlcampos
victorlcampos / robot.js
Created December 1, 2012 16:06
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);
@victorlcampos
victorlcampos / robot.js
Created December 2, 2012 12:15
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) {
@victorlcampos
victorlcampos / robot.js
Created December 2, 2012 14:06 — forked from heynemann/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
//robot.clone();
this.robotOptions = {
clone: {
canStartFight: false,
goBackOnCollision: false
@victorlcampos
victorlcampos / Basic Gemfile
Last active December 16, 2015 22:49
Iniciar um novo projeto
# UTILITIES
group :development do
gem 'pry-rails'
gem 'better_errors'
gem 'binding_of_caller'
# continuous integration
gem 'guard-rails'
gem 'guard-jasmine'
gem 'guard-rspec'
@victorlcampos
victorlcampos / Aplicativos
Last active December 18, 2015 23:49
Conteúdo gerado por membros do Grupo "Ruby on Rails Brasil"
== InfoDic FREE
https://play.google.com/store/apps/details?id=br.walisson.inglesparainformaticafree#?t=W251bGwsMSwxLDIxMiwiYnIud2FsaXNzb24uaW5nbGVzcGFyYWluZm9ybWF0aWNhZnJlZSJd
@victorlcampos
victorlcampos / binary_search.exs
Created October 25, 2015 10:53
Código para adivinha um número passado dentro de Range
defmodule BinarySearch do
def guess(number, a..b), do: guess(number, a..b, calc_half(a, b))
def guess(number, _, number) do
IO.puts("Is it #{number}")
IO.puts(number)
end
def guess(number, _..b, my_guess) when number > my_guess do
IO.puts("Is it #{my_guess}")
Swap
ACC
KG
Res2770
Concessão Garantias
FIANÇA
CÂMBIO
Conta Garantida - PN
Crédito Rural - PN
SBLC