Skip to content

Instantly share code, notes, and snippets.

@sidneylimafilho
sidneylimafilho / gist:1093699
Created July 19, 2011 21:00
Servidor de Sessão REST
var sessions = {}
var app = require("express").createServer();
app.get("/:sessionid/:key", function(req, res) {
// Get the current session or create one
var session = sessions[req.params.sessionid] || (sessions[req.params.sessionid] = {});
res.send(session[req.params.key]);
});
app.post("/:sessionid/:key", function(req, res) {
@sidneylimafilho
sidneylimafilho / gist:1096402
Created July 21, 2011 02:42
Splat coffeescript sample in Javascript
var corrida = function(){
var vencedor = [].shift.call(arguments);
var competidores = [].slice.call(arguments);
alert(competidores);
}
@sidneylimafilho
sidneylimafilho / busca.js
Created September 21, 2011 23:34 — forked from cmilfont/busca.js
Pegar todos os links que não pertencam a uma determinada table
$("a:visible:not([tabindex]:visible a, #tabela1 a, a:visible a)")
@sidneylimafilho
sidneylimafilho / gist:1260907
Created October 4, 2011 04:28
Counterproof node is a cancer
var http = require("http");
function fibonacci(n, callback) {
if (n < 2) return 1;
if (callback)
setTimeout(function () { callback(fibonacci(n - 2) + fibonacci(n - 1)) }, 0);
else
return fibonacci(n - 2) + fibonacci(n - 1);
}
@sidneylimafilho
sidneylimafilho / LICENSE.txt
Created October 20, 2012 20:26 — forked from Najki/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <pinkoblomingo@gmail.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Sidney Filho</string>
<key>name</key>
<string>Dark Night</string>
<key>settings</key>
<array>
[
{
"i": 1,
"A1_COD": "000055",
"A1_LOJA": "01",
"A1_NOME": "2TREE CONSULTORIA E MEIO AMBIENTE LTDA",
"A1_NREDUZ": "2TREE CONSULTORIA",
"A1_PESSOA": "J",
"A1_TIPO": "F",
"A1_END": "R JEQUITIBA",
//+------------------------------------------------------------------+
//| cand_color.mq5 |
//| ProF |
//| http:// |
//+------------------------------------------------------------------+
#property copyright "Bere" //Author
#property indicator_chart_window //Indicator in separate window
//Specify the number of buffers of the indicator