Skip to content

Instantly share code, notes, and snippets.

View flaviodesousa's full-sized avatar

Flávio de Sousa flaviodesousa

View GitHub Profile
"basics": {
"name": "Flávio de Sousa",
"label": "Software Engineer",
"image": "",
"email": "",
"phone": "+49 176 8085 8357",
"url": "",
"summary": "I am a Software Developer with a track of several successful projects using C (mostly under UNIX), C++ (STL, MFC), Java, C# (MFC, WCF), Perl, Python (Django), UNIX, Oracle. I have led small teams of developers, setup productive development environments and have a solid background of timely and quality deliveries.",
"location": {
flaviodesousa / die-welle-one-buffer.html
Last active October 8, 2016 23:32
Die Welle ohne double buffering
<h1>Die Welle</h1>
<canvas id="canvas" width="700" height="700"></canvas>
void getAndPrintGameTable(){
char gamesTable[12800];
memset(gamesTable, 0, 12800);
int iRet;
GL_Dialog_Message(xGoal, NULL, "Aguarde...", GL_ICON_INFORMATION, GL_BUTTON_NONE, 0);
iRet = GetJsonFromServer("GET_GAMES_TABLE", gamesTable);
if (iRet >= 0)
flaviodesousa / package.json
Last active February 23, 2016 11:31
Bookshelf js fetchAll withRelated option returns empty relation object - attempt to reproduce
"name": "bookshelf-relations",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"author": "",
"license": "ISC",

Keybase proof

I hereby claim:

  • I am flaviodesousa on github.
  • I am flaviodesousa ( on keybase.
  • I have a public key whose fingerprint is 59F8 7D16 8F45 62F6 0E8D 0320 AABC 7820 20B8 799A

To claim this, I am signing this object:

flaviodesousa / catter.c
Created March 30, 2015 10:41
Exploring the time complexity of strcat() and realloc()
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
void measure(char *name, void (*func)(char**,char *,char*,int), char **target, char *initial, char *repeat, int times)
clock_t start, finish;
start = clock();
func(target, initial, repeat, times);
flaviodesousa /
Created October 12, 2012 13:49
My wife tried finding all permutations of my name's letters. Didn't believe when I said there were 6! ones...
#! /usr/bin/python
import sys
def permutate(used, free, built, found):
if free == {} and built not in found:
found[built] = 1
print built
for letter in free.keys():
flaviodesousa / FindMaximum.vb
Created September 12, 2012 18:10
Option Explicit On
Option Strict On
Imports Microsoft.SolverFoundation.Common
Imports Microsoft.SolverFoundation.Services
Module SolverSample
Public Structure FindMaximumResult
Public Solutions1() As Double
flaviodesousa /
Created July 13, 2012 00:54
Exemplo de modelo de documento versionado
class Documento(models.Model):
nome = models.CharField(max_length=128)
autor = models.CharField(max_length=128)
versao_atual = models.ForeignKey('Versao', related_name='+')
class Versao(models.Model):
texto = models.TextField()
criacao = models.DateTimeField(auto_now_add=True)
documento = models.ForeignKey(Documento, related_name='versoes')
flaviodesousa / gist:2319963
Created April 6, 2012 13:53
Unable to load DLL 'SQLite.Interop.dll'
Username: fds201112151033
Date: Thursday, April 05, 2012
User Agent: OfficeDropSync OfficeDrop.Sync/1.3.4478.35476 Win32NT/Microsoft Windows NT 6.1.7601 Service Pack 1 (.Net Framework v4.0.30319)
Product Name: OfficeDrop Sync
Current Culture: en-US