Skip to content

Instantly share code, notes, and snippets.

Nathan Reed Reedbeta

Block or report user

Report or block Reedbeta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Reedbeta / interesting-libs.txt
Created May 28, 2019
Interesting libraries I might like to use in a project
View interesting-libs.txt
Interesting libraries I might like to use in a project...
Asset loading:
assetsys.h - virtual filesystem with ZIP backing, overlaying, etc
cute_filewatch.h - file modification watching, for runtime reloading etc
stb_image -
tinyexr -
tinygltf -
tinyobjloader -
Reedbeta / srgb.glsl
Created Aug 3, 2018
Conversion between sRGB and linear color encoding
View srgb.glsl
vec3 sRGBToLinear(vec3 rgb)
// See
return mix(pow((rgb + 0.055) * (1.0 / 1.055), vec3(2.4)),
rgb * (1.0/12.92),
lessThanEqual(rgb, vec3(0.04045)));
vec3 LinearToSRGB(vec3 rgb)
Reedbeta / comptr.h
Created Feb 8, 2018
Auto-releasing wrapper for COM pointers
View comptr.h
// Auto-releasing wrapper for COM pointers
// Feel free to use this for whatever, I don't care
template <typename T>
struct comptr
T * p;
comptr(): p(nullptr) {}
comptr(T * other): p(other)
{ if (p) p->AddRef(); }
Reedbeta / letter-swapper.js
Created May 14, 2017
Letter swapper Greasemonkey script. Just for shits and giggles.
View letter-swapper.js
// ==UserScript==
// @name Letter Swapper
// @namespace
// @version 1
// @grant none
// @include *
// @exclude https://**
// ==/UserScript==
var swaps =
Reedbeta / bash-and-cmd-in-context-menu.reg
Last active Jul 14, 2019
Windows registry edit to add Bash and Command Prompt items to Explorer context menu
View bash-and-cmd-in-context-menu.reg
Windows Registry Editor Version 5.00
Reedbeta / comptr.hpp
Created Jul 7, 2016
GPU PRNG & hash-function testbed
View comptr.hpp
// COM pointer - wraps a COM object and automatically calls AddRef() / Release() as necessary
#pragma once
template <typename T>
class comptr
comptr ()
Reedbeta / cool-game-programming-blogs.opml
Last active Sep 13, 2019
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
View cool-game-programming-blogs.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<title>Graphics, Games, Programming, and Physics Blogs</title>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="" htmlUrl=""/>

Programming Language Evaluation

A list of simple tasks to perform when learning or evaluating a new language. Each of these should be able to be completed in a few hours, and will help to get the feel of the language and its standard libraries. A well-rounded set of evaluation tasks will help ensure all parts of the language are exercised. You might also write some tests to demonstrate implementation correctness.


  1. Hello world
  2. Read lines from a text file and output them in sorted order
  3. Read numbers from a text file and output the mean and standard deviation
  4. Given an amount of money and a list of coin denominations provided on the command line, output all the possible ways to make change
View hlsl.php
* hlsl.php
* -----
* Author: Nick Darnell (
* Copyright: (c) 2010 Nick Darnell (
* Release Version: 1.0
* Date Started: 6/30/2010
* HLSL language file for GeSHi.
# Simulator for depth comparison error (i.e. z-fighting)
# Nathan Reed, June 2015
# Written for Python 3.4; requires numpy
import math
import numpy as np
import optparse
# Parse command-line options
parser = optparse.OptionParser()
You can’t perform that action at this time.