Skip to content

Instantly share code, notes, and snippets.

View derofim's full-sized avatar

Den derofim

  • Google
  • USA
View GitHub Profile
@derofim
derofim / crsl.cpp
Created March 10, 2019 09:08 — forked from andrew-pa/crsl.cpp
Cairo, GL, SDL together
#include <iostream>
#include <cairo/cairo.h>
#include <cairo/cairo-gl.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_syswm.h>
int main(int argc, char* argv[]) {
SDL_Init(SDL_INIT_VIDEO);
auto win = SDL_CreateWindow("crsl", 300, 300, 512, 512, SDL_WINDOW_OPENGL);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
@derofim
derofim / db-tips.md
Created March 3, 2019 09:15 — forked from bric3/UTF-8-demo.txt
Shell (commands) tips accumulated over years

DB

SQL

Create table using with

with user_count as (
 select
@derofim
derofim / emacs.md
Created March 3, 2019 09:14 — forked from adimanea/emacs.md
My emacs tips, tricks & config
@derofim
derofim / Model.cpp
Created January 12, 2017 09:31 — forked from emmasteimann/Model.cpp
Assimp loader
#include "Model.hpp"
bool core::ModelLoader::loadModel(const char* fp, Model* m)
{
core::log("Loading " + (std::string)fp, core::green);
Assimp::Importer importer; // used to import the model
const aiScene* scene = importer.ReadFile(fp,
aiProcess_Triangulate |