Skip to content

Instantly share code, notes, and snippets.

View Godoy's full-sized avatar

Adriano Godoy Godoy

View GitHub Profile
@Godoy
Godoy / gist:61310c563116ff5664ad
Created February 26, 2015 20:44 — forked from rodrigogmdias/Benchmark Ruby Each
Benchmark Ruby Each
@array = 1..100000000
def case0 #### 5s
i = Time.now
@array.each do |o|
# puts "#{o}"
end
(Time.now - i)
end
@Godoy
Godoy / gist:5137345
Last active December 14, 2015 19:29 — forked from leandrocustodio/gist:5137295
Carregar Json de uma URL externa (facebook, twitter...)
string recebeJSON = "";
using (var client = new WebClient())
{
recebeJSON = client.DownloadString("URL do JSON");
}
//transforma a string em objeto
JObject _recebeJSON = JObject.Parse(recebeJSON);
@Godoy
Godoy / gist:5110936
Last active December 14, 2015 15:49 — forked from tiagobbraga/gist:5110874
Observando alterações de DOM em uma div
setTimeout
(
StartWatching,
100
);
function StartWatching()
{
$("#someDiv").bind('DOMSubtreeModified',function() {
alert('modificou');