Skip to content

Instantly share code, notes, and snippets.

View purbon's full-sized avatar

Pere Urbón purbon

View GitHub Profile
@purbon
purbon / neo4jrb_inserter_bug.rb
Created April 18, 2011 14:32
Batch inserter bug when creating two node models, two nodes and running two batch insertions
require 'neo4j'
#
# This bug happens with jruby 1.6.0 and
# $ gem list | grep neo4j
# neo4j (1.0.0 java)
# and
# $ java -version
# java version "1.6.0_24"
# Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
@purbon
purbon / peliculas.csv
Created December 10, 2011 19:19 — forked from guillermo/peliculas.csv
Peliculas
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 1 column, instead of 2. in line 2.
¡Mamma Mia! http://www.megavideo.com/?v=39G6ZIBW DVD Español
1997: Rescate en Nueva York http://www.megaupload.com/?d=1IQVR204 DVD-RIP Español
2001 una odisea en el espacio http://www.megaupload.com/?d=RJEPWE9Z 1,4Gb DVD-RIP
30 minutes or less 1 http://freakshare.com/files/36kax38u/los.changosos.part1.gz 271 MB DD
30 minutes or less 2 http://freakshare.com/files/9dfsg4zz/los.changosos.part2.gz 271 MB DD
300.avi http://www.fileserve.com/file/NfBQcz7 698.04 MB DD
Across The Universe DVDRip http://depositfiles.com/files/giklyvrqq 469.59 MB DD Dual
Amélie http://www.fileserve.com/file/mqVEMe3/ 700 MB DD
American Beauty http://www.megaupload.com/?d=W99XXY96 701 MB DD
Asterix en los Juegos Olímpicos (2008) http://www.megavideo.com/?v=JSNXVYH6 362.20 MB Streaming
@purbon
purbon / otsbjs.md
Created July 20, 2012 14:03 — forked from agnoster/otsbjs.md
Open Tech School Berlin JS

In the spirit of Railsgirls Berlin, we want to start a programming education group for JavaScript. We need your help to get all the coaching done.

If you are interested in coaching JavaScript, fork this gist and add yourself or leave your contact data in a comment:

@purbon
purbon / otsbjs.md
Created July 20, 2012 14:05 — forked from agnoster/otsbjs.md
Open Tech School Berlin JS

In the spirit of Railsgirls Berlin, we want to start a programming education group for JavaScript. We need your help to get all the coaching done.

If you are interested in coaching JavaScript, fork this gist and add yourself or leave your contact data in a comment:

@purbon
purbon / package.json
Created September 21, 2012 18:54
Stream live web cam video using Node.js and Gstreamer
{
"name": "streamingtest",
"version": "0.0.1",
"engines": {
"node": ">=0.6.0"
},
"dependencies": {
"express": "2.5.x",
"coffee-script": "1.2.x"
},
@purbon
purbon / add_verb_sinatra.rb
Created November 20, 2012 14:29
New HTTP verbs for sinatra
def self.add_new_verb(verb)
(class << self; self; end).send(:define_method, verb.downcase.to_sym) do |path, opts={}, &block|
route(verb.upcase, path, opts, &block)
end
end
/**
* Read the value of a header in the current document.
*
* This uses a [single] XMLHTTPRequest to do a HEAD of the current document
* and fetch HTTP response header values. Note that the implementation is
* rather stupid in that it spins waiting for the XMLHTTPRequest to complete
* if it hasn't been called yet.
*
* @param name string
  1. General Background and Overview
@purbon
purbon / before_filter.rb
Last active August 29, 2015 14:11
before filter for profiling
#!/usr/bin/env ruby
module T
def self.included(base)
base.extend(T::ClassMethods)
end
module ClassMethods
def before(*methods, &block)
@purbon
purbon / logstash-ranking
Last active August 29, 2015 14:13
Logstash commit stats
TOP 10 (lines deleted)
{:author=>"jordansissel", :stats=>{"a"=>157242, "d"=>136489, "c"=>2918}, :score=>136489}
{:author=>"electrical", :stats=>{"a"=>14915, "d"=>36889, "c"=>94}, :score=>36889}
{:author=>"untergeek", :stats=>{"a"=>2165, "d"=>10751, "c"=>75}, :score=>10751}
{:author=>"colinsurprenant", :stats=>{"a"=>6110, "d"=>4519, "c"=>104}, :score=>4519}
{:author=>"fetep", :stats=>{"a"=>8198, "d"=>3981, "c"=>320}, :score=>3981}
{:author=>"rud", :stats=>{"a"=>158, "d"=>1195, "c"=>6}, :score=>1195}
{:author=>"ph", :stats=>{"a"=>1553, "d"=>1091, "c"=>11}, :score=>1091}
{:author=>"kurtado", :stats=>{"a"=>3439, "d"=>990, "c"=>91}, :score=>990}