Skip to content

Instantly share code, notes, and snippets.

@roxlu
roxlu / code.cpp
Last active June 4, 2020 01:56
Signature :)
---------------------------------------------------------------
oooo
`888
oooo d8b .ooooo. oooo ooo 888 oooo oooo
`888""8P d88' `88b `88b..8P' 888 `888 `888
888 888 888 Y888' 888 888 888
888 888 888 .o8"'88b 888 888 888
d888b `Y8bod8P' o88' 888o o888o `V88V"V8P'
@roxlu
roxlu / GUI.cpp
Created December 29, 2013 14:19
Minimal AntTweakBar integration with GLFW
#include <assert.h>
#include <GLFW/glfw3.h>
#include <swnt/GUI.h>
GUI::GUI()
:win_w(0)
,win_h(0)
{
}
@roxlu
roxlu / compile.sh
Created January 5, 2014 12:39
NGINX + PHP + MySQL
#!/bin/sh
# Compiling nginx + php + mysql on Mac OSX 10.9
# ---------------------------------------------
#
#
# CONFIGURE
# ---------------
# 1) Edit `conf/nginx.conf` and add this to the between the server { ... } config.
# NOTE: the current config you only need to uncomment the example that looks like this,
@roxlu
roxlu / compile.sh
Created January 4, 2014 17:01
NGINX + PHP + configuration
#!/bin/sh
# Compiling nginx + php + mysql on Mac OSX 10.9
# ---------------------------------------------
#
#
# CONFIGURE
# ---------------
# 1) Edit `conf/nginx.conf` and add this to the between the server { ... } config.
# NOTE: the current config you only need to uncomment the example that looks like this,
@roxlu
roxlu / ParallelTransportFrames.cpp
Created June 2, 2012 19:03
Generalizing Parallel Transport Frames
#include "ParallelTransportFrames.h"
#include "OpenGL.h"
void ParallelTransportFrames::addPoint(const Vec3& p) {
points.push_back(p);
}
void ParallelTransportFrames::create(Vec3 V) {
Vec3 V_prev = V;
for(int i = 0; i < points.size()-2; ++i) {
@roxlu
roxlu / tinylib.h
Last active July 24, 2019 15:22
Tinylib - the most basic features for easy graphics development with GL
/*
--------------------------------------------------------------------------------
oooo
`888
oooo d8b .ooooo. oooo ooo 888 oooo oooo
`888""8P d88' `88b `88b..8P' 888 `888 `888
888 888 888 Y888' 888 888 888
888 888 888 .o8"'88b 888 888 888
@roxlu
roxlu / AsyncUpload.cpp
Last active April 26, 2019 09:44
Experimental code to test fast pixel transfers using PBOs.
#include <gfx/AsyncUpload.h>
namespace gfx {
AsyncUpload::AsyncUpload()
:width(0)
,height(0)
,dx(0)
,channels(0)
,n(0)
@roxlu
roxlu / Config.cpp
Last active February 18, 2019 21:33
Tiny, fast and clean configuration file parser using rapidxml with example of a to be released streaming video library http://rapidxml.sourceforge.net/
#include <iostream>
#include <fstream>
#include <rapidxml.hpp>
#include "Config.h"
Config::Config() {
}
Config::~Config() {
}
@roxlu
roxlu / keep_running.scpt
Created April 29, 2012 09:36
Keep application running, auto restart on crash
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
on makeActive(appName)
tell application appName
activate
end tell
end makeActive
@roxlu
roxlu / CMakeLists.txt
Created September 26, 2014 12:55
Work in progress, simple cross platform mutex and threading code
cmake_minimum_required(VERSION 2.8.11)
set(bd ${CMAKE_CURRENT_LIST_DIR})
set(id ${bd})
include_directories(${id})
add_executable(test_thread test_thread.cpp)
if (WIN32)