Skip to content

Instantly share code, notes, and snippets.

View apples's full-sized avatar
🏳️‍🌈

Apples apples

🏳️‍🌈
View GitHub Profile
#include <tuple>
#include <utility>
// Smart pointers
struct SampleStruct
{
int x = 0;
SampleStruct(int a, int b, int c)
@apples
apples / vao.cpp
Last active August 29, 2015 14:05
// ULTIMATE VERTEX ARRAY OBJECT EXAMPLE
// No guarantee of correctness.
// Warranty void upon successful compile.
// No warranty.
// This software is released into the public domain.
#include <GL/glew.h> // or whatever loader you want.
#include <glm/glm.hpp> // or whatever math library you want.
#include <cstddef>
@apples
apples / thread_worker.hpp
Created October 14, 2014 08:39
Automagic thread pool.
#ifndef THREAD_WORKER_HPP
#define THREAD_WORKER_HPP
#include <thread>
#include <future>
#include <mutex>
#include <condition_variable>
#include <list>
#include <utility>
#include <functional>
@apples
apples / better_assert.hpp
Created October 14, 2014 08:41
Better (read: slower) form of assert() with juicy output and exceptions.
#ifndef BETTER_ASSERT_HPP
#define BETTER_ASSERT_HPP
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
template <typename B>
struct _asserter {
@apples
apples / Makefile
Last active August 29, 2015 14:16
Moral of the story: Use Scons.
# User Configuration
# Compiler flags
CPPFLAGS +=
CXXFLAGS += -std=c++1y -pedantic -Wall
LDFLAGS +=
LDLIBS +=
# Libraries and Executables to be built
LIBS += core
@apples
apples / slides.html
Created March 26, 2015 21:40
slides.html
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Droid+Sans:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body { font-family: 'Helvetica', 'sans-serif' ; }

How to Dev a Game

The Journey

  1. Ideas and Design
  2. Engines and Scripting
  3. Art, Animation, and Audio
  4. Aesthetics and the Ludonarrative
  5. Scope and Minimum Viable Product
  6. Resources
#ifndef RASPBERRY_HPP
#define RASPBERRY_HPP
#include <memory>
#include <utility>
#define DECL_ERASURE_MEMBER_CONCEPT(ConceptName, FuncName) \
template <typename Func> \
struct ConceptName; \
template <typename R, typename... Args> \
#ifndef BRAEBURN_RESOURCECACHE_HPP
#define BRAEBURN_RESOURCECACHE_HPP
#include <memory>
#include <string>
#include <unordered_map>
#include <typeindex>
namespace braeburn {
@apples
apples / document.md
Created May 20, 2017 22:01
Internet Security Starter Kit

placeholder