Skip to content

Instantly share code, notes, and snippets.

View jeandudey's full-sized avatar
🦅

Jean-Pierre De Jesus DIAZ jeandudey

🦅
View GitHub Profile
@jeandudey
jeandudey / Main.cc
Created July 14, 2015 14:11
Is even or odd in C++ template metaprogramming.
#include <iostream>
template <int a>
struct isodd {
static constexpr bool value = a % 2;
};
template <int a>
struct iseven {
static constexpr bool value = !(a % 2);
@jeandudey
jeandudey / README.md
Last active December 4, 2017 16:47
My git commit template.

Template for Git

To use this template just paste all of this (crap) in your terminal or set the correct options for git:

cd ~/
wget https://gist.github.com/jeandudey/34bfd30d2668fb572449/raw/6bcebe9d843aff6d0a5d130d0a6ea327f80f1afd/template -O .gctemplate
git config --global commit.template ~/.gctemplate
void Text::glRenderText(std::string text, TTF_Font *font, SDL_Color color, SDL_Rect *location)
{
int w,
h;
SDL_Surface *FontSurface;
GLuint TextureID;
FontSurface = TTF_RenderText_Blended(font, text.c_str(), color);