Skip to content

Instantly share code, notes, and snippets.

View marceloemanoel's full-sized avatar

Marcelo Emanoel Bezerra Diniz marceloemanoel

View GitHub Profile
@marceloemanoel
marceloemanoel / bash
Created January 14, 2014 14:03 — forked from panchicore/bash
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
@marceloemanoel
marceloemanoel / gist:4261636
Created December 11, 2012 20:02 — forked from alissonsales/gist:776153
Filmes e documentários para abrir sua mente
Lista de documentários e filmes que considero como "obrigatórios", ou seja, todos deveriam assistir.
O critério usado para colocar um item na lista é: O documentário/filme mudou sua visão do mundo.
Documentários:
The Corporation - http://www.imdb.com/title/tt0379225/
The Story of Stuff - http://www.storyofstuff.com/
The Genius of Charles Darwin - http://en.wikipedia.org/wiki/The_Genius_of_Charles_Darwin
BBC - Horizon: How Many People Can Live on Planet Earth? - http://www.bbc.co.uk/programmes/b00pdjmk
@marceloemanoel
marceloemanoel / djr.js
Created April 8, 2012 19:55 — forked from cmilfont/djr.js
Turma 3 - Exercício 4 - DJR
Array.prototype.add = function(el) {
this[this.length] = el;
return this;
};
if(typeof Array.prototype.each == "undefined") {
Array.prototype.each = function(fn) {
for(var index = 0; index < this.length; index++) {
fn(this[index], index);
}
@marceloemanoel
marceloemanoel / engine.js
Created April 8, 2012 19:55 — forked from cmilfont/engine.js
Turma 3 - Exercicio 2 - Engine de Template
var objeto = {
nome: "Christiano Milfont", telefone: "23423423", idade: 18,
paginacao: function(name) { return name; }
};
var template = "<div> #{paginacao(nome)} #{nome} \
- #{telefone} - #{ (idade >= 18)? \"permitido\": \"proibido\" }</div>";
function Engine(tmpl) {
var _pattern = /\#\{([^}]+)\}/g;
@marceloemanoel
marceloemanoel / montarjson.js
Created April 8, 2012 19:55 — forked from cmilfont/montarjson.js
Turma 3 - Exercicio 3 - Montar JSON
var json = {}
var name = "empresa.id";
var valor = "01/01/2011";
var gerarJSON = (function gerarJSON(json, hierarquia, value) {
var hierarquia = hierarquia.split(".");
var last = hierarquia.pop();
var temp = {};
@marceloemanoel
marceloemanoel / db_examples_on_activerecord.rb
Created March 1, 2012 13:20 — forked from rponte/db_examples_on_activerecord.rb
disabling referential integrity examples
## ORACLE
def disable_referential_integrity(&block) #:nodoc:
sql_constraints = <<-SQL
SELECT constraint_name, owner, table_name
FROM user_constraints
WHERE constraint_type = 'R'
AND status = 'ENABLED'
SQL
old_constraints = select_all(sql_constraints)
begin
@marceloemanoel
marceloemanoel / nodeconf_2011.md
Created May 15, 2011 12:23 — forked from cmilfont/nodeconf_2011.md
a list of slides from nodeconf 2011