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 / 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)
@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 / 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 / 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 / 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: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)
import feedparser
def showRSS(bot, update):
rss_url = feedparser.parse("http://distrowatch.com/news/dwd.xml")
for i in range(1):
sendMessage(bot, update,
rss_url.entries[i].title + ": \n" +
rss_url.entries[i].link)
return rss_url
@cogumm
cogumm / markdown-text-discord.md
Last active November 5, 2024 13:06 — forked from matthewzring/markdown-text-101.md
Guia de Markdown para o nosso amado Discord.

Markdown Text 101

Quer deixar o seu seu bate-papo de texto do Discord com um sabor diferente? Você está com sorte, pois este é um Guia de Markdown para o nosso amado Discord!. O Discord usa o Markdown, um sistema simples de formatação de texto simples que ajudará você a destacar suas frases. Veja como fazer isso! Apenas adicione alguns caráteres antes e depois de texto desejado para mudar o estilo! Vou te mostrar alguns exemplos ...

Menu:

@cogumm
cogumm / limparImpressaoUindolus.bat
Created March 29, 2019 13:11
Script limpador de spooler de impressão Uindolus
echo ################################################################
echo Script limpador de spooler de impressão
echo LEMBRE-SE DE EXECUTAR COMO ADMINISTRADOR
echo NÃO ME RESPONSABILIZO POR MAUS DANOS À MÁQUINA COM ESTE SCRIPT,
echo FAVOR UTILIZÁ-LO SE APENAS TIVER CERTEZA DO QUE ESTEJA FAZENDO.
echo ################################################################
echo Este script tem como objetivo limpar a fila de impressão do Uindolus
net stop spooler
echo spooler finalizado
cd %systemroot%\system32\spool\printers