Skip to content

Instantly share code, notes, and snippets.

View vmg's full-sized avatar

Vicent Martí vmg

View GitHub Profile
@vmg
vmg / colldump.cc
Created February 7, 2024 14:49
Collation Dumper for MySQL 8+
/* Copyright (c) 2023, The Vitess Authors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional

Keybase proof

I hereby claim:

  • I am vmg on github.
  • I am vmg (https://keybase.io/vmg) on keybase.
  • I have a public key whose fingerprint is 6710 C221 95AF C7CD 4FB2 CA6F F6ED DD8B 825D 88AE

To claim this, I am signing this object:

From 4aa903b97d6532e46666f5aed966696716e5ee40 Mon Sep 17 00:00:00 2001
From: Vicent Marti <tanoku@gmail.com>
Date: Sat, 21 Dec 2013 14:33:46 +0100
Subject: [PATCH] Add `pack.honorpackkeep` config var
---
builtin/repack.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/builtin/repack.c b/builtin/repack.c
@vmg
vmg / shaggawoo.md
Created September 13, 2012 05:17
this is your mom

lol

@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"},
@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 / 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 / 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

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