Skip to content

Instantly share code, notes, and snippets.

View cogumm's full-sized avatar
:electron:
CTO | Tech Leader | Senior Systems Analyst | Hybrid Remote

Gabriel Vilar cogumm

:electron:
CTO | Tech Leader | Senior Systems Analyst | Hybrid Remote
View GitHub Profile
@cogumm
cogumm / gist:7657452
Created November 26, 2013 12:18
Power-polygon #78
[cogumm@cogumm]/power-polygon$ sudo node run.js
module.js:340
throw err;
^
Error: Cannot find module 'bytes'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
@cogumm
cogumm / gist:4551892
Last active December 11, 2015 05:28
Daft Punk - Fight Robot
var cannonRotated = false;
var Robot = function(robot) {
robot.rotateCannon(-90);
cannonRotated = true;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (!cannonRotated){
@cogumm
cogumm / gist:3785020
Created September 25, 2012 23:15
Feed de imagens
require 'rubygems'
require 'sinatra'
require 'hpricot'
require 'open-uri'
html = '<html><head><title>Feed de imagens</title>'
html += '<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></meta></head>'
html += '<link rel="stylesheet" href="http://passets-lt.pinterest.com/css/pinboard_759c5bb3.css" type="text/css" media="all"/>'
html += '<body><h1>Feed de imagens</h1>'
@cogumm
cogumm / sortwitter.rb
Created September 28, 2011 19:30
Sorteio Twitter
# ~~~~~~~~~~~~~~~~~~~~~~~~
# souDev: @CoGUMm
# WebSite: www.CoGUMm.net
# ~~~~~~~~~~~~~~~~~~~~~~~~
#encoding: utf-8
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'json/pure'
@cogumm
cogumm / pt-BR.yml
Created May 12, 2011 03:45
My pt-BR for projects!
pt-BR:
activerecord:
models:
attributes:
# Devise
user:
name: Nome
email: E-mail
@cogumm
cogumm / redgreen.rb
Created December 28, 2010 19:11
monkey patched
class Test::Unit::UI::Console::RedGreenTestRunner < Test::Unit::UI::Console::TestRunner
def initialize(suite, output_level=NORMAL, io=$stdout)
# monkey patched passando os parametros suite, output_level
super(suite, output_level)
# monkey patched @io = io
@io = io
end
# monkey patched adicionado o parametro color=nil
def output_single(something, color=nil, level=NORMAL)