Skip to content

Instantly share code, notes, and snippets.

@wheybags
wheybags / email_blog_subscribe.py
Last active December 26, 2023 21:27
email_blog_subscribe.py
#!/usr/bin/env python3
# license MIT
import sys
import traceback
print("Content-type: text/html\r\n\r\n")
def run():
@wheybags
wheybags / rebuild.sh
Last active December 12, 2023 12:08
gcc html madness
#!/bin/bash
set -euxo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"
# Treat as c source file: -x c
# Don't output line markers: -P
# Don't search system include path: -nostdinc
// Headerphile.com OpenGL Tutorial part 1
// A Hello World in the world of OpenGL ( creating a simple windonw and setting background color )
// Source code is an C++ adaption / simplicication of : https://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL_(C_/_SDL)
// Compile : clang++ main.cpp -lGL -lSDL2 -std=c++11 -o Test
// C++ Headers
#include <string>
#include <iostream>
// OpenGL / glew Headers
#include <thread>
#include <mutex>
#include <atomic>
class State
{
public:
std::mutex mMutex;
};
@wheybags
wheybags / sdl_gl_func.py
Last active May 14, 2017 15:13
python file to generate code to load opengl functions in sdl2
funcs = [
"glGenBuffers",
"glBindBuffer",
"glBufferData",
"glGenVertexArrays",
"glBindVertexArray",
"glEnableVertexAttribArray",
"glVertexAttribPointer",
"glCreateShader",
"glCompileShader",
------------------
System Information
------------------
Time of this report: 7/16/2014, 23:06:38
Machine name: PONG
Operating System: Windows Server 2012 Datacenter 64-bit (6.2, Build 9200) (9200.win8_rtm.120725-1247)
Language: English (Regional Setting: English)
System Manufacturer: System manufacturer
System Model: System Product Name
BIOS: BIOS Date: 02/05/10 19:13:52 Ver: 08.00.10