Skip to content

Instantly share code, notes, and snippets.

@danielchasehooper
danielchasehooper / inline_shader.js
Created February 4, 2025 20:33
the code that creates the interactive shader editor for danielchasehooper.com
"use strict";
// I'm posting at the request of this lobsters comment: https://lobste.rs/s/ycbpnz/animating_rick_morty_one_pixel_at_time#c_wonfh3
// this code sets up the live shader editor on http://danielchasehooper.com/posts/code-animated-rick/
(function() {
let gl;
let program;
let cached_vertex_shader;
@danielchasehooper
danielchasehooper / count.sh
Created October 23, 2014 21:10
Count the lines of code in the current directory
#!/bin/sh
find . \( -iname "*.[chm]" -o -iname "*.swift" -o -iname "*.cpp" -o -iname "*.mm" \) -print0 | xargs -0 cat | wc -l
@danielchasehooper
danielchasehooper / BlenderAnimationExport.py
Created March 4, 2012 21:13
This is the Blender export script used to export Percepto's animated models
#!BPY
# Blender animation export script by Daniel Hooper
# www.danielhooper.tumblr.com
import bpy
from os.path import basename
import struct
GL_FLOAT = 5126
GL_UNSIGNED_INT = 5125