Skip to content

Instantly share code, notes, and snippets.

View vmg's full-sized avatar

Vicent Martí vmg

View GitHub Profile
Gist no es una funcionalidad de Git, es solo una feature mas de GitHub. Simplemente es una aplicacion web para compartir codigo, errores, texto... lo que sea.
Crea un gist publico y lo puedes compartir con quien sea solo pasando el link (los gist se leen desde el navegador).
Lo mejor de todo es que los gist se guardan en nuestro backend como repositorios de Git: eso permite hacer control de versiones (guardar una lista de todos los cambios que le hagas a un gist), y si lo necesitas, puedes clonar directamente a tu disco duro el gist entero, y viene con toda su historia! Perfecto para colaborar o prototipar.
@vmg
vmg / gist:959251
Created May 6, 2011 16:07
2000 curated "that's what she said" jokes to train a Bayesian classifier
Wow! It's so much better when you do it faster!
Take it out and start working on it.
I wish you would finish already.
This thing is huge. I can hardly put my hand around it and it wont fit in my mouth.
When you push it down, it's supposed to rise back up.
I hate it when balls come near me.
Alright Justin, what am I doing wrong here, help me out cause it shouldn't take this long.
Wow, why do you only have one hand on there? Is it not big enough for both of them?
I think I cant swallow it anymore.
I like the long thick black ones.
@vmg
vmg / gist:1020018
Created June 10, 2011 23:29
LOLBUNDLERLOL
sunnycat:rails_autolink vicent$ bundle install vendor/gems
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/vicent/Developer/.rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.11/lib/bundler/shared_helpers.rb:3.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/vicent/Developer/.rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.11/lib/bundler/source.rb:162.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /Users/vicent/Developer/.rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.11/lib/bundler/source.rb:162.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Users/vicent/Developer/.rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.11/lib/bundler/source.rb:162.
NOTE: Gem::SourceIndex#each is deprecated wi

gh-preview-bug-thing

Appears to be broken:

  1. Edit a markdown file on GH, in the web browser.
  2. Add the following coffee snippet.
//= require path/to/assets

gh-preview-bug-thing

Appears to be broken:

  1. Edit a markdown file on GH, in the web browser.
  2. Add the following coffee snippet.
//= require path/to/assets

gh-preview-bug-thing

Appears to be broken:

  1. Edit a markdown file on GH, in the web browser.
  2. Add the following coffee snippet.
//= require path/to/assets
@vmg
vmg / sparc.c
Created November 15, 2011 23:03
Sparks in C
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
int main
(int argc
,char *ac []){int i, count = argc - 1;
double * dvalues=malloc(01- 01+count*
sizeof(double)+1); double mi=DBL_MAX,ran=.0,ma =DBL_MIN,mo;for(i= 00; argc>1
&&i<count;i=i+8-7) {double val = atof(ac[i+1]) ;if(23&&val<mi)mi= val;if(val
@vmg
vmg / error-handling.md
Created February 11, 2012 02:41
Error handling in libgit2

Error reporting in libgit2

Error reporting is performed on an explicit git_error ** argument, which appears at the end of all API calls that can return an error. Yes, this does clutter the API.

When a function fails, an error is set on the error variable and returns one of the generic error codes.

int git_repository_open(git_repository **repository, const char *path, git_error **error)
{
@vmg
vmg / bench.c
Created July 30, 2012 10:32
SYNTHETIC BENCHMARKS ARE HARD LET'S GO SHOPPING
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/resource.h>
static double get_time()
{
struct timeval t;
struct timezone tzp;
@vmg
vmg / gnome.json
Created July 31, 2012 01:38
GNOME.org Repository Mirror list
[{"name":"perl-Gnome2-Rsvg","url":"git://git.gnome.org/perl-Gnome2-Rsvg","last_commit":"2012-01-08"},
{"name":"gnome-spell","url":"git://git.gnome.org/gnome-spell","last_commit":"2010-06-30"},
{"name":"at-spi","url":"git://git.gnome.org/at-spi","last_commit":"2011-09-22"},
{"name":"model","url":"git://git.gnome.org/model","last_commit":"2010-05-13"},
{"name":"gnome-video-effects","url":"git://git.gnome.org/gnome-video-effects","last_commit":"2012-05-17"},
{"name":"gnome-web-wppo","url":"git://git.gnome.org/gnome-web-wppo","last_commit":"2012-03-16"},
{"name":"bug-buddy","url":"git://git.gnome.org/bug-buddy","last_commit":"2012-02-22"},
{"name":"niepce","url":"git://git.gnome.org/niepce","last_commit":"2012-07-26"},
{"name":"gimmie","url":"git://git.gnome.org/gimmie","last_commit":"2010-12-28"},
{"name":"gnome-panel","url":"git://git.gnome.org/gnome-panel","last_commit":"2012-07-18"},