Skip to content

Instantly share code, notes, and snippets.

View decitrig's full-sized avatar

Ryan W Sims decitrig

  • Google, LLC
  • Pittsburgh, PA
View GitHub Profile
@decitrig
decitrig / crossgl.go
Created September 20, 2021 01:51
Segfaults with glfw as well
package main
import (
"log"
"runtime"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
)
@decitrig
decitrig / crossgl.go
Last active September 20, 2021 01:34
Failed attempt to cross-compile opengl, sdl, go.
package main
// Compile on WSL with
// CC=i686-w64-mingw32-gcc GOOS=windows GOARCH=386 CGO_ENABLED=1 go run .
import (
"log"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/veandco/go-sdl2/sdl"
@decitrig
decitrig / coordinates.hlsl
Last active November 30, 2019 16:28
Shaders for showing DirectX coordinate conventions
static const float4 kPositions[] = {
// A downard-pointing triangle near the viewer.
float4(-1, 1, 0, 1), // Red
float4(1, 1, 0, 1), // Green
float4(0, -1, 0, 1), // Blue
// An upward-pointing triangle far from the viewer.
float4(1, -1, .9, 1), // Red
float4(-1, -1, .9, 1), // Green
float4(0, 1, .9, 1), // Blue
@decitrig
decitrig / dfhack_workflow.txt
Created October 28, 2012 00:10 — forked from wjrogers/dfhack_workflow.txt
dfhack configuration
# enable the plugin
workflow enable drybuckets auto-melt
# farming
workflow amount FOOD 120 30
workflow amount DRINK 300 50
workflow amount THREAD//GRASS_TAIL_PIG:THREAD 30 20
workflow count LIQUID_MISC//POD_SWEET:EXTRACT 20 10
# storage
@decitrig
decitrig / gist:1747506
Created February 5, 2012 19:16
Incorrect FindBugs analysis with CheckForNull annotation on field.
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
public class WrongNPWarning {
@CheckForNull
private String foo;
public WrongNPWarning() {
Runnable r = new Runnable() {
@decitrig
decitrig / example.in.txt
Created April 19, 2011 18:55
Python test generator for CMSC 420 MeeshQuest project
1024 1024 1 4
city A 100 100
city B 1020 1020
city C 100 1020
city Cp 450 900
city D 800 500
city E 100 1021
city F 2048 1023
city G 2048 1000
road A B