Skip to content

Instantly share code, notes, and snippets.

View heat's full-sized avatar
🌚
Working from home

Onezino Moreira heat

🌚
Working from home
View GitHub Profile
@heat
heat / gist:1177150
Created August 28, 2011 20:07
last sub-header richfaces style change
<style>
.tabela-alterada .rich-table-subheader th:last-child {
background-color : #fff;
}
</style>
<rich:panel header="teste">
<rich:dataTable value="#{reBeam.alunos}" var="aluno" styleClass="tabela-alterada" >
<f:facet name="header">
<rich:columnGroup>
@heat
heat / gist:2138403
Created March 20, 2012 17:30
store credit problem resolve
#! /usr/bin/env python
import sys, re, os
class Item :
def __init__(self) :
self.no = 0
self.value = 0.0
def __init__(self, no, value) :
self.no = no
self.value = value
@heat
heat / gist:2138417
Created March 20, 2012 17:31
Reverse word problem solve
#! /usr/bin/env python
import sys, re, os, string
f = open('problem.in')
cases = int(f.readline())
@heat
heat / NewKorg
Created May 18, 2012 17:18
Korg Language
/**
versao aceita definicao de variaveis;
- atribuicao a variavel
definiçoes de funcoes
- corpo da funcao
- retorno da funcao
var PI = 3.14
exports.area = function (r) {
return PI * r * r
}
exports.circumference = function (r) {
return 2 * PI * r
}
@heat
heat / jasmine.matcher.toBeInstanceOf.js
Created September 4, 2012 19:45
Jasmine Matcher instanceof
beforeEach(function() {
this.addMatchers({
toBeInstanceOf: function(expectedInstance) {
var actual = this.actual;
var notText = this.isNot ? " not" : "";
this.message = function() {
return "Expected " + actual.constructor.name + notText + " is instance of " + expectedInstance.name;
};
return actual instanceof expectedInstance;
}
@heat
heat / appfog-wsgi.py
Created September 12, 2012 00:34
example wsgi flask application for appfog
#!/usr/bin/env python
import time
import sys
import os
import json
from flask import Flask, Request, Response
application = app = Flask('wsgi')
@heat
heat / html5.html
Created November 1, 2012 02:49
html5 file structure
<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="estilo.css">
@heat
heat / 10gen.repo
Created November 27, 2012 11:11
Mongo repo for yum
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
@heat
heat / gist:4173132
Created November 30, 2012 01:24 — forked from anonymous/gist:4173130
Player
function Player(world) {
var WALK_VX = 0.2;
var WALK_VY = 0.2;
var vx = 0;
var vy = 0;
//0- olhando para esquerda; 1 - olhando para direita
var face = 0;
var pos = this.pos = [gs.width/2, gs.height / 2 ];