Skip to content

Instantly share code, notes, and snippets.

View chubas's full-sized avatar

Rubén Medellín chubas

View GitHub Profile
@chubas
chubas / Gemfile
Created September 28, 2012 15:27 — forked from ivanacostarubio/Gemfile
ICANHAZTYPOS
source :rubygems
gem 'levenshtein-ffi', :require => 'levenshtein'
gem "rspec"
Cuiki = function() {
this.makeChoice = function() {
setTimeout(function() {
return Chameleon.Color.random();
}, 5 * 60 * 1000);
}
return this;
}
@chubas
chubas / neon_test.js
Created June 25, 2012 01:19
Neon test
if(typeof require !== 'undefined') { // We are in Node, need to require the file
console.log("Requiring neon from file");
var Neon = require('../neon.js');
console.log(Neon);
// In Coffeescript, the following construct is recommended
// { Class, Module, Interface } = require('neon')
var Class = Neon.Class;
@chubas
chubas / about.md
Created March 19, 2012 18:31 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@chubas
chubas / gist:1213102
Created September 13, 2011 04:16
Centering floated elements
#container {
float:right;
position:relative;
left:-50%;
}
#container ul {
list-style:none;
position:relative;
left:50%;
}
ul.menu a {color: #fff !important;}
pre, .section .gist .gist-file .gist-data pre {
font-family: 'Consolas',sans-serif !important;
letter-spacing: -1px !important;
color: #eee !important;
background-color: #000 !important;
}
div.gist-file, .gist-syntax, .gist-data{
line-height: 1.5 !important;
font-family: 'Consolas',sans-serif !important;
@chubas
chubas / stretto-example.rb
Created March 8, 2011 16:47
Stretto documentation - example snippet
require 'stretto'
player = Stretto::Player.new('C C G G | A A Gh | F F E E | D D Ch')
player.play
@chubas
chubas / gist:706023
Created November 19, 2010 02:03
Assorted Linux Commands
#===== Video
ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
#===== Audio
# Start timidity port
timidity -iA -B0 -Os -EFreverb=0
*** glibc detected *** ruby: double free or corruption (fasttop): 0x10922a48 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0x63a0d1]
/lib/tls/i686/cmov/libc.so.6[0x63b7d2]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x63e8ad]
ruby(ruby_xfree+0x26)[0x8073316]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x166)[0xe0b886]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x84)[0xe0b7a4]
/usr/lib/libxml2.so.2(xmlFreeNodeList+0x84)[0xe0b7a4]
/usr/lib/libxml2.so.2(xmlFreeDoc+0xc2)[0xe0b5e2]
@chubas
chubas / gist:646101
Created October 26, 2010 00:43
WTF arithmetics
t = Time.now
wtf = 2.years
puts wtf.to_i #=> 63115200
puts ((t + wtf) - t).to_i #=> 63158400