Skip to content

Instantly share code, notes, and snippets.

Javier Blanco Gutiérrez jbgutierrez

Block or report user

Report or block jbgutierrez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jbgutierrez / gist:30122
Created Nov 28, 2008
Smart definition of Fibonacci Sequence (
View gist:30122
def fib n
case n
when 0..1 then n
else fib(n-1) + fib(n-2)
# thouth it should be rewritten as a loop to avoid a stackoverflow
View gist:30126
response = Net::HTTP.post_form("...")
rescue Timeout::Error,
Net::ProtocolError => e
# ...
import java.util.*;
public class TestThread extends Thread
public static void main(String[] args){
new TestThread().start();
new TestThread().start();
public void run(){
Vector<Safe> aList= new Vector<Safe>();
for(Integer i = 0; i<3; i++)
View isArray.js
function isArray(o) {
return === '[object Array]';
jbgutierrez / random_word.rb
Created Feb 7, 2009
Magnus Holm’s solution
View random_word.rb
# Generate a random string of length 4 or more consisting of only the following
set of characters: a-z, A-Z, 0-9
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \
public class StringTest
public static void main (String [] args)
String a = "Esto no se va a imprimir";
String b = "Esto se va a imprimir";
a = b;
b = "Esto parece que se va a imprimir, pero NO!";
View environment.rb
ActiveRecord::Base.logger ="#{RAILS_ROOT}/log/#{RAILS_ENV}_database.log")
config.action_controller.relative_url_root = "/<sub-uri>"
View Add spacers to the Leopard Dock
defaults write persistent-apps -array-add '{"tile-type"="spacer-tile";}'
killall Dock
jbgutierrez / export_somethings_data.js
Created May 10, 2009
Exportador de tareas de Somethings
View export_somethings_data.js
// ==UserScript==
// @name export_somethings_data.js
// @namespace
// @description Export "Somethings" data
// @include
// ==/UserScript==
// Add jQuery
var GM_JQ = document.createElement('script');
GM_JQ.src = '';
You can’t perform that action at this time.