Skip to content

Instantly share code, notes, and snippets.

View maestrelli's full-sized avatar

Wagner Maestrelli maestrelli

  • Curitiba, Brasil
View GitHub Profile
@maestrelli
maestrelli / memory.h
Created September 3, 2011 14:48
Some C dynamic memory allocation macros
#include <stdlib.h>
#include <stdio.h>
#define ERROR_ALLOC_MESSAGE "Insufficient memory"
#define MALLOC(p, n) \
do \
{ \
if ( !( (p) = malloc(sizeof(*(p)) * (n)) ) ) \
{ \
@maestrelli
maestrelli / gist:1169188
Created August 24, 2011 20:51
MySql char variables
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8