Skip to content

Instantly share code, notes, and snippets.

@juniorz
juniorz / robot.js
Created December 7, 2012 23:04 — forked from yuyi/robot.js
OPENROBOT
function Robot(robot) {
this.dd = false;
}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@juniorz
juniorz / robot.js
Created December 7, 2012 23:16
Jaba
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
var count = 0;
var width = 13; // 13px
};
Robot.prototype.turnTo = function(robot, degree) {
@juniorz
juniorz / sfml.rb
Last active December 10, 2015 13:18
Homebrew SFML formula
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Sfml < Formula
homepage 'http://www.sfml-dev.org'
version '2.0-rc'
url 'https://github.com/LaurentGomila/SFML/archive/2.0-rc.zip'
require 'rubygems'
require 'fog'
Fog.mock!
describe 'Bug' do
it 'should not fail' do
compute = Fog::Compute.new(
:provider => 'openstack',
:openstack_username => 'user',
@juniorz
juniorz / Dockerfile
Last active December 28, 2015 11:39
Jenkins
# -------------------------------------------------------------------
# docker build -t juniorz/jenkins git://gist.github.com/7494802.git
# -------------------------------------------------------------------
FROM phusion/baseimage:0.9.1
MAINTAINER Reinaldo Junior <juniorz@gmail.com>
RUN apt-get update && apt-get upgrade -y
# Remove authentication rights for insecure_key.
RUN echo /bin/sh -c \"rm -f /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys\" > /sbin/remove_authorized_keys &&\
@juniorz
juniorz / Dockerfile
Last active December 28, 2015 16:19
ThoughtWorks Go Server
# -------------------------------------------------------------------
# $ docker build -t juniorz/go-server git://gist.github.com/7528566.git
# -------------------------------------------------------------------
# 1. $ docker run -d -p 8080:8153 juniorz/go-server
# 2. Go to http://localhost:8080/go/
# -------------------------------------------------------------------
FROM phusion/baseimage:0.9.1
MAINTAINER Reinaldo Junior <juniorz@gmail.com>
@juniorz
juniorz / Dockerfile
Last active December 28, 2015 17:19
ThoughtWorks Go Agent
# -------------------------------------------------------------------
# $ docker build -t juniorz/go-agent git://gist.github.com/7534920.git
# -------------------------------------------------------------------
# 1. $ docker run -d -l go-server:go_server -p 8080:8153 juniorz/go-agent
# 2. Go to http://localhost:8080/go/
# -------------------------------------------------------------------
FROM phusion/baseimage:0.9.1
MAINTAINER Reinaldo Junior <juniorz@gmail.com>
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 17:59
Base docker image
# garage-env/base
# volumes?
# env variables?
# -------------------------------------------------------------------
# $ docker build -t garage-env/base git://gist.github.com/7865019.git
# -------------------------------------------------------------------
#
# -------------------------------------------------------------------
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 18:09
Ruby 2.0 (base)
# -------------------------------------------------------------------
# $ docker build -t garage-env/ruby20-base git://gist.github.com/7865680.git
# -------------------------------------------------------------------
FROM garage-env/base
MAINTAINER Reinaldo Junior <juniorz@gmail.com>
## Installs Ruby 2.0.0 from Brightbox PPA
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 &&\
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 18:18
Ruby 2.0
# -------------------------------------------------------------------
# $ docker build -t garage-env/ruby20 git://gist.github.com/7866174.git
# -------------------------------------------------------------------
# $ echo 'puts "Hello"' > hello.rb
# $ docker run -v `pwd`:/garage -t garage-env/ruby20 foo.rb
# Heloo
# -------------------------------------------------------------------
FROM garage-env/ruby20-base