Skip to content

Instantly share code, notes, and snippets.

@grifo
Created May 29, 2012 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grifo/2828449 to your computer and use it in GitHub Desktop.
Save grifo/2828449 to your computer and use it in GitHub Desktop.
Solução de João Paulo Murowaniecki Sant'Anna e Guilherme Medeiros
/* ____ _ _
/ ___|___ _ __ ___ _ __ __ _ _ __ | |__ (_) __ _
| | / _ \| '_ ` _ \| '_ \ / _` | '_ \| '_ \| |/ _` |
| |__| (_) | | | | | | |_) | (_| | | | | | | | | (_| |
\____\___/|_| |_| |_| .__/ \__,_|_| |_|_| |_|_|\__,_|
|_|
____ _ _ _ _ ____ _ _
/ ___(_) |__ ___ _ __ _ __ ___| |_(_) ___ __ _ / ___|(_)_ __(_)_ _ ___
| | | | '_ \ / _ \ '__| '_ \ / _ \ __| |/ __/ _` | \___ \| | '__| | | | / __|
| |___| | |_) | __/ | | | | | __/ |_| | (_| (_| | ___) | | | | | |_| \__ \
\____|_|_.__/ \___|_| |_| |_|\___|\__|_|\___\__,_| |____/|_|_| |_|\__,_|___/
Este é o (bootstrap do) repositório padrão de todo o conhecimento e sabedoria.
Execute via `node` ou no console do FireBug/Chrome/etc..
*******************************************************************************
*******************************************************************************
*******************************************************************************
*******************************************************************************
____ _ _ ____ _
| _ \ ___ _ __ ( ) |_ | _ \ __ _ _ __ (_) ___
| | | |/ _ \| '_ \|/| __| | |_) / _` | '_ \| |/ __|
| |_| | (_) | | | | | |_ | __/ (_| | | | | | (__
|____/ \___/|_| |_| \__| |_| \__,_|_| |_|_|\___|
*******************************************************************************
*******************************************************************************
Funções por _ _ _ http://facebook.com/medeeiros
__ _ _ _(_) | |__ ___ _ __ _ __ ___ ___
/ _` | | | | | | '_ \ / _ \ '__| '_ ` _ \ / _ \
| (_| | |_| | | | | | | __/ | | | | | | | __/
\__, |\__,_|_|_|_| |_|\___|_| |_| |_| |_|\___|
|___/ _ _
_ __ ___ ___ __| | ___(_)_ __ ___ ___
| '_ ` _ \ / _ \/ _` |/ _ \ | '__/ _ \/ __|
| | | | | | __/ (_| | __/ | | | (_) \__ \
|_| |_| |_|\___|\__,_|\___|_|_| \___/|___/
_
_| |_
|_ _|
|_|
_ _ __ _
(_)___ ___ __ ___________ _ ______ _____ (_)__ _____/ /__(_)
/ / __ `__ \/ / / / ___/ __ \ | /| / / __ `/ __ \/ / _ \/ ___/ //_/ /
/ / / / / / / /_/ / / / /_/ / |/ |/ / /_/ / / / / / __/ /__/ ,< / /
__/ /_/ /_/ /_/\__,_/_/ \____/|__/|__/\__,_/_/ /_/_/\___/\___/_/|_/_/
/___/ http://facebook.com/jmurowaniecki
*/
var PensadorProfundo = (function(){
"Há uma teoria que indica que sempre que qualquer um descobrir exatamente \
o que, para que e porque o universo está aqui, o mesmo desaparecerá e será \
substituído imediatamente por algo ainda mais bizarro e inexplicável.. \
Há uma outra teoria que indica que isto já aconteceu. "
try {
"gerador de infinidade de possibilidades de uso para uma toalha"
var respostas = universo = {} || {} & {} || {} || ( {} & {} | {});
;
" Se ratos foram os responsáveis pelo desenvolvimento do Pensador \
Profundo, dois humanos podem muito bem rascunhar o Pantagrucérebro \
Colossal de Maximegalon."
var Abaco = PantagrucerebroColossalDeMaximegalon = (typeof PantagrucerebroColossalDeMaximegalon == 'SuperComputadorCapazDeContarAtomosDeUmaEstrela')
? PantagrucerebroColossalDeMaximegalon
: (function(){ return 'PantagrucerebroColossalDeMaximegalon'; })();
} catch(_e) {
return 'Pedimos desculpas pelo inconveniente.';
}
var vortice_da_perspectiva_total = function(_criatura, _totalidade_da_realidade){
/* Programado por Trim Tragula
TODO: apesar de funcionar com qualquer pedaço de matéria do universo
este código utiliza os padrões extrapolados apenas da aleatoriedade
de um pão de ló (ou objeto de tipo similar).*/
return (typeof _totalidade_da_realidade == "PaoDeLo"
&& typeof _criatura == "Racional"
&& _criatura.racionalizar(_totalidade_da_realidade.extrapolar()))
? {
composicao: _totalidade_da_realidade.composicao,
historia: {
economica: _totalidade_da_realidade.historia['economica'],
social: _totalidade_da_realidade.historia['social']
}
}
: false;
}
/* Reprogramado por Zaphod
TODO: testei a função vortice_da_perspectiva_total eu mesmo porém percebo
que OU funcionou incorretamente OU exatamente como devia. Todavia resolvi
contribuir com o desenvolvimento da função e resolvi reprogramar a função
que define o objeto PaoDeLo, porém deletei acidentalmente a rotina - mas
estou correndo atrás da versão anterior no svn.
var PaoDeLo = {
// ..bateu fome, vou fazer um de verdade
// http://cybercook.terra.com.br/pao-de-lo.html?codigo=8677
};
*/
var coracao_de_ouro = {
color: '#FFFFFFFF',
size: '150m',
core: {
PHG: function(_e, _m, _o){
return {
humanize: _e && _m && _o
}
},
Eddie: {
behavior: 'extremamente amigável',
executar_comando: function(_comando, _prioridade, _emocoes){
return false; // 'risadinha'; modificado por Zaphod pois estava irritando.
}
}
},
gerador_de_probabilidade_finita: function(_i){
var _r = false;
;
if ( ! isNaN(_i) && (_i > 0 || (_i = _i * -1) > 0))
while (_i--) _r = Math.random() * Math.random();
return _r;
},
gerador_de_probabilidade_infinita: function(){
var _r = false;
;
while (_r != this.gerador_de_probabilidade_finita(true)) _r = Math.random() * Math.random();
return _r;
}
}
" Para mais obter informações consulte http://pt.wikipedia.org/wiki/Toalha \
Tudo o que você precisará quando o universo acabar é de uma toalha."
var toalha = this;
// existem infinitas formas de uso para uma toalha - inclusive a de
// substituição ocasional do infinito (ou do PensadorProfundo, ou de uma
// calculadora ternária qualquer - ou não).
var BabelFish = {
color: 'yellow',
size: '4mm',
pattern: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
traduz: function(_A){
var _r='',_a,_b,_c,_d,_e,_f,_g,i=0;
_A=_A.replace(/[^A-Za-z0-9\+\/\=]/g,'');
while (i < _A.length){
_d=this.pattern.indexOf(_A.charAt(i++));
_e=this.pattern.indexOf(_A.charAt(i++));
_f=this.pattern.indexOf(_A.charAt(i++));
_g=this.pattern.indexOf(_A.charAt(i++));
_a=(_d << 2) | (_e >> 4);
_b=((_e & 15) << 4) | (_f >> 2);
_c=((_f & 3) << 6) | _g;
_r=_r+String.fromCharCode(_a);
if (_f !=64) _r+=String.fromCharCode(_b);
if (_g !=64) _r+=String.fromCharCode(_c);
}
return this.escuta(_r);
},
escuta: function(_u){
var _r='',i=0,c=c1=c2=0;
while (i < _u.length){
c=_u.charCodeAt(i);
if (c < 128){
_r+=String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)){
c2=_u.charCodeAt(i+1);
_r+=String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i+=2;
}
else{
c2=_u.charCodeAt(i+1);
c3=_u.charCodeAt(i+2);
_r+=String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i+=3;
}
}
return _r;
}
};
"..Uma das provas de que Deus existe é a de que ele insiste em inexistir.."
var Deus = ((typeof BabelFish == 'object') ? true : false) && (function(){ return undefined; })();
false, true, true, false, true, false, true, false, false, true, true, true
true, true, false, true, false, true, false, true, false, false, true, true
true, false, false, false, false, false, false, true, false, true, true, 11
var Marvin = {
behavior: this,
default_behavior: 'mimimi existencialista',
abre_porta : function(_porta) { return this.default_behavior; },
fecha_porta : function(_porta) { return this.default_behavior; }
}
var numeros = (function(){
var _o = 'Mg==|NA==|OA==|MTU=|MTY=|MjM=|NDI='.split('|');
var _r = [];
for (i in _o) _r.push(BabelFish.traduz(_o[i]));
return _r;
})();
return {
viatura: coracao_de_ouro,
equipamento_essencial: {
'toalha' : toalha
},
respostas: [
Marvin.abre_porta(),
numeros,
(function(){
return Marvin.fecha_porta()
})()
],
_resposta_final: numeros.pop()
};
var resistencia = function(){
/* return undefined; */
"toda resitência é inútil"
}
})();
console.dir(PensadorProfundo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment