Skip to content

Instantly share code, notes, and snippets.

View wrl's full-sized avatar

william light wrl

View GitHub Profile
#!/bin/dash
path=$(readlink -f "$(which "$0")")
prefix=${path%-*}-
program=${0##*-}
default_cflags="-isysroot /home/will/macosx_sdks/SDKs/MacOSX10.8.sdk"
$program -target x86_64-apple-darwin -B "$prefix" $default_cflags "$@"
@wrl
wrl / keybase.md
Created April 7, 2016 14:06
keybase.md

Keybase proof

I hereby claim:

  • I am wrl on github.
  • I am wrl (https://keybase.io/wrl) on keybase.
  • I have a public key ASAMsNic-9W2ZXx47icCplV_6GU0O6HTIWfAXR_zUH1KYgo

To claim this, I am signing this object:

==10629== Invalid read of size 4
==10629== at 0x54880E3: __pthread_mutex_unlock_usercnt (in /usr/lib/libpthread-2.22.so)
==10629== by 0x242BD8B6: __gthread_mutex_unlock (gthr-default.h:778)
==10629== by 0x242BD8B6: __gthread_recursive_mutex_unlock (gthr-default.h:831)
==10629== by 0x242BD8B6: unlock (mutex:194)
==10629== by 0x242BD8B6: ~lock_guard (mutex:392)
==10629== by 0x242BD8B6: Airwave::Plugin::dispatchProc(AEffect*, int, int, long, void*, float) (plugin.cpp:734)
==10629== by 0xA9CCD8: ??? (in /usr/bin/renoise-3.1.0)
==10629== by 0xAA5CBA: ??? (in /usr/bin/renoise-3.1.0)
==10629== by 0xA63A7B: ??? (in /usr/bin/renoise-3.1.0)
class LameError < RuntimeError
end
ShibeTest::Suite.new('ShibeTest') do
should_pass 'assert true' do |assert|
assert.true { true }
end
should_fail 'fail assert true' do |assert|
assert.true { false }
@wrl
wrl / gc_map.c
Last active December 24, 2015 12:59
/*
** keeping track of objects that exist in both C and mruby is tricky! in
** situations where you're binding to a library which maintains its own
** internal lists of child objects (say, in a UI toolkit, a container
** object with a list of contained widgets), you want to do the least
** amount of bookkeeping possible, lest you do your bookkeeping wrong.
**
** here's a simple solution. it works by mapping a cptr to a ruby object,
** which preferably you'd use to wrap around said cptr with a MRB_TT_DATA
** object. the way you use it is simple: whenever you get a pointer back
@wrl
wrl / style.c
Created September 28, 2013 15:13
a compiled rutabaga stylesheet
/**
* rutabaga: an OpenGL widget toolkit
* Copyright (c) 2013 William Light.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
#!/bin/sh
# ustream
STREAM_KEY=""
STREAM_URL="rtmp://1.12617548.fme.ustream.tv/ustreamVideo/12617548/$STREAM_KEY flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
# livestream
#LS_USER=
#LS_PASSWD=
#URL="mogulus/$LS_USER/username=$LS_USER/password=$LS_PASS/isAutoLive=true"
@wrl
wrl / midi_mikro.c
Created April 30, 2013 23:14
maschine mikro -> midi translator
/**
* william light <wrl@illest.net> wrote this in 2012
*
* released under creative commons CC0
* http://creativecommons.org/publicdomain/zero/1.0/
*/
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
@wrl
wrl / fb_status.c
Created March 8, 2013 00:29
tiny helper routine for pretty-printing glCheckFramebufferStatus()
static void fb_status(const char *where)
{
switch (glCheckFramebufferStatus(GL_FRAMEBUFFER)) {
case GL_FRAMEBUFFER_COMPLETE:
printf(" :: GL_FRAMEBUFFER_COMPLETE in %s\n", where);
break;
case GL_FRAMEBUFFER_UNDEFINED:
printf(" :: GL_FRAMEBUFFER_UNDEFINED in %s\n", where);
break;
@wrl
wrl / womblack256.vim
Created February 20, 2013 21:17
nice dark vim colourscheme i've been modifying continuously over the years
" Generated by colorsupport.vim (DO NOT MODIFY THIS LINE)
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "womblack256"
hi Normal guifg=#f6f3e8 guibg=NONE gui=none cterm=none ctermfg=15 ctermbg=NONE
hi SpecialKey gui=none guifg=Cyan guibg=none cterm=none ctermfg=51 ctermbg=none
hi NonText gui=bold guifg=Blue guibg=none cterm=bold ctermfg=21 ctermbg=none