Skip to content

Instantly share code, notes, and snippets.

View runnerpack's full-sized avatar

Amos runnerpack

View GitHub Profile
@runnerpack
runnerpack / active_chart.html
Created February 12, 2024 15:43
An HTML+JS+CSS chart that allows clicking cells to toggle them, dragging to paint multiple cells, and clearing all cells
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tracking Chart</title>
<script>
function onLoad() {
// Parse the URL parameters
var r = 5, c = 7, s = 0;
const params = new URL(window.location.toLocaleString()).searchParams;
if (params.has('r')) { r = +params.get('r'); }
@runnerpack
runnerpack / poly_circle.rb
Created August 19, 2018 23:31
Gosu (Ruby) code for drawing unfilled circles with a line of any thickness. Based on code by shawn42.
# Draws an unfilled circle with a line of any thickness
# Based on code by shawn42
#
# TODO:
# * Textures(?)
# * Use OpenGL (e.g. triangle fan)
# * Convert to C++ (and submit pull request)
# * Anti-aliasing based on VASEr's techniques (http://tyt2y3.github.io/vaser-web/)
require 'gosu'
@runnerpack
runnerpack / stderr.txt
Created September 18, 2016 01:29
What's a YAXPAX?
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
c:\lib\nvapi\x86/nvapi.lib(_out/Windows/developer/x86/nvlink_gen.obj):C:\u\workspace\NVA:(.text[??_GCSingletonCriticalSection@@UAEPAXI@Z]+0x1c): undefined reference to `??3@YAXPAX@Z'
c:\lib\nvapi\x86/nvapi.lib(_out/Windows/developer/x86/nvlink_gen.obj):C:\u\workspace\NVA:(.text[??_GCAutoCriticalSection@@UAEPAXI@Z]+0x4f): undefined reference to `??3@YAXPAX@Z'
collect2.exe: error: ld returned 1 exit status
@runnerpack
runnerpack / stderr.txt
Created September 18, 2016 01:13
Compiler error
opengl_3dv.c: In function 'void GLD3DBuffers_create(GLD3DBuffers*, void*, bool, bool)':
opengl_3dv.c:201:75: error: invalid initialization of reference of type 'const IID& {aka const _GUID&}' from expression of type 'const GUID* {aka const _GUID*}'
if (d3dEx->lpVtbl->QueryInterface(d3dEx, &IID_IDirect3D9, (LPVOID*) &d3d) != S_OK) {
^
@runnerpack
runnerpack / gosu_3d.rb
Created March 8, 2015 18:35
Ashton problem
# Idea: use GLSL shaders in Gosu/Ashton to draw stereoscopic graphics
# Technologies (to be) supported:
# * Row interleaved
# * Over/under
# * Side-by-side
# * Anaglyph (Red/cyan, Green/magenta, Yellow/blue, and grayscale versions of those)
# * Rift-style HMDs(?)
# On FPR displays (like my Asus VG23AH) it works without special mode changes, expensive drivers, or fancy cables!
@runnerpack
runnerpack / jump.rb
Created January 10, 2014 00:05
My basic implementation of "platformer" physics, based on information from http://freespace.virgin.net/hugo.elias/models/m_main.htm You'll need to supply your own "dude.png" to act as a character.
# Fix require path issues in 1.9.*
$: << "."
begin; require 'rubygems'; rescue; end
require 'gosu'
include Gosu
#require 'texplay'