Skip to content

Instantly share code, notes, and snippets.

View hodrigohamalho's full-sized avatar
💭
let's code!

Rodrigo Ramalho hodrigohamalho

💭
let's code!
View GitHub Profile
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
var rx = robot.position.x;
var ry = robot.position.y;
var aH = robot.arenaHeight;
var aW = robot.arenaWidth;
robot.clone();
robot.fire();
};
@hodrigohamalho
hodrigohamalho / robot.js
Created December 5, 2012 12:47 — forked from Mr0ok/robot.js
hodrigohamalho
//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.clone();
@hodrigohamalho
hodrigohamalho / gist:03d285438243d209d708
Last active August 29, 2015 14:17
ATOM Installation on Windows Environment

When trying to install asciidoc-preview plugin this error pops up:

Fixing unable to connect to github.com errno: No error

It seems to be caused because you're trying to install this plugin behind a firewall.

First config git to use always https instead git protocol.

git config --global url."https://".insteadOf git://
@hodrigohamalho
hodrigohamalho / Docker.adoc
Last active August 29, 2015 14:19
Docker Cheat Sheet

Docker

docker search -s 1 fedora
  • -s = number of image at least N stars

  • --no-trunc=true prints full image description

Download Image

Once a image has been found, use:

# ps aux no servidor e mata o resultado
kill -9 $( ps aux | grep server-one | grep -v grep | awk '{print $2}')
@hodrigohamalho
hodrigohamalho / ose.adoc
Last active September 28, 2015 01:16
OSE3.adoc

Openshift V3

Environment

  • oselab (administration host)

  • master00 (master host, contains Etcd and the management console)

  • infranode00 (infranode host, Will run our infrastructure containers: Registry and Router)

  • node00 (node host, Region: Primary, Zone: East. )

  • node01 (node host, Region: Primary, Zone: West. )

@hodrigohamalho
hodrigohamalho / openshift-guide.adoc
Last active April 26, 2016 01:06
Openshift On RHEL Guide

Installation Rhel 7.1

Parallels Tools (Mac OS Only)

mkdir /media/cdrom
mount -o exec /dev/sr0 /media/cdrom
cd /media/cdrom
./install

Dnsmasq (Mac os)

@hodrigohamalho
hodrigohamalho / ose-demo.adoc
Last active July 11, 2017 05:45
ose-demo.adoc

Demo Openshift

  1. Introdução ao docker

  2. dockerhub & images

  3. Demo

Executa o fedora docker run -it fedora cat /etc/fedora-release

@hodrigohamalho
hodrigohamalho / latency.txt
Created March 27, 2016 13:48 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@hodrigohamalho
hodrigohamalho / demo-eap.adoc
Last active April 20, 2016 05:03
Demonstração EAP

Demonstração EAP 7

Pre Req

Interfaces de Rede

sudo ifconfig lo0 alias 127.0.0.2
sudo ifconfig lo0 alias 127.0.0.3
  1. Introdução ao EAP