Skip to content

Instantly share code, notes, and snippets.

View fernandobrito's full-sized avatar

Fernando Brito fernandobrito

View GitHub Profile
--------------- teste_cor.lua ---------------
canvas:attrColor('white')
canvas:drawRect("fill", 0, 0, canvas:attrSize())
teste = canvas:new(canvas:attrSize())
teste:attrColor('red')
teste:drawRect("fill", 60, 60, 50, 50)
canvas:compose(0, 0, teste)
<?xml version="1.0" encoding="ISO-8859-1"?>
<ncl id="nclLua" xmlns="http://www.ncl.org.br/NCL3.0/EDTVProfile">
<head>
<regionBase>
<region width="90%" height="90%" left="5%" top="5%" id="rgLua1"/>
</regionBase>
<descriptorBase>
<?xml version="1.0" encoding="ISO-8859-1"?>
<ncl id="chat_tela" xmlns="http://www.ncl.org.br/NCL3.0/EDTVProfile">
<head>
<regionBase>
<region id="rgVideo1" width="100%" height="100%" right="0%" bottom="0%" zIndex="1"/>
<region id="rgVideo2" width="200" height="200" right="0%" top="0%" zIndex="2"/>
<region id="rgVideo3" width="200" height="200" left="0%" bottom="0%" zIndex="3"/>
</regionBase>
<descriptorBase>
# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
#deb http://archive.ubuntu.com/ubuntu lucid main restricted
#deb-src http://archive.ubuntu.com/ubuntu lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
#deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted
From 9b9bf8e73a2886cb36a093b336dcdf5632073cc9 Mon Sep 17 00:00:00 2001
From: Fernando Brito <email@fernandobrito.com>
Date: Wed, 1 Dec 2010 16:11:58 -0300
Subject: [PATCH] Add mimetype for cobol.lang
---
data/language-specs/cobol.lang | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/data/language-specs/cobol.lang b/data/language-specs/cobol.lang
@fernandobrito
fernandobrito / atm.rb
Created May 7, 2011 01:37
Caixa Eletrônico
# * Problema do Coding Dojo @ UFPB - 06/05/2011
# Escreva uma função que simula um caixa eletrônico, recebendo um valor a ser sacado e retornando
# uma string com as cédulas que o caixa deve retornar.
#
# Exemplo: saque: 167
# retorno: "100:1 50:1 10:1 5:1 2:1"
require "test/unit"
def conta_cedulas(saque)
fernando@fernandobrito.com [~/apps/bestmovies]# gem install nokogiri
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
@fernandobrito
fernandobrito / gist:2064877
Created March 17, 2012 20:12
GSoC 2012 Questions
"A link to a bug tracker for your open source organization is NOT an ideas list."
Organizations linking to bug trackers:
* Apache
* Boinc
Not open source?
def add_to_substrings(substrings, candidate, count)
substrings[candidate] += count if substrings[candidate]
substrings[candidate] = count
end
STRING = "aaabbbababcdd"
MIN_SUPORT = 2
candidates = []
substrings = {}