Skip to content

Instantly share code, notes, and snippets.

View bdon's full-sized avatar
😈

Brandon Liu bdon

😈
View GitHub Profile
@bdon
bdon / computer.glsl
Last active June 15, 2018 20:20
rc computer
//https://thebookofshaders.com/edit.php
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
/*
* Copyright (c) 2001 Fabrice Bellard
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@bdon
bdon / database_server.py
Last active March 16, 2018 15:20
python2.7 httpserver example
#!/usr/bin/python2.7
import unittest
import httplib
import BaseHTTPServer
# run these tests with: python -m unittest database_server
class TestDatabaseServer(unittest.TestCase):
def test_get(self):
h = httplib.HTTPConnection('localhost:4000')
h.request("GET","/set?somekey=somevalue")
@bdon
bdon / brooklyn_libraries.geojson
Created March 10, 2018 21:35
brooklyn libraries
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import sys
filename = sys.argv[1]
# Takes a STV blt file. Stripe out invalid ballots and leading numbers () first.
f = open(filename,'r')
totals = {}
end_votes_reached = False
candidates = []
seats = None
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdon
bdon / openterrain-extent.geojson
Created June 24, 2015 15:08
OpenTerrain extent 6/24/2015
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdon
bdon / gist:2ab08080b9e975a82052
Created July 9, 2014 20:40
California - broken Multipolygon relations
http://openstreetmap.org/relation/1124439
http://openstreetmap.org/relation/112444
http://openstreetmap.org/relation/112534
http://openstreetmap.org/relation/112620
http://openstreetmap.org/relation/2144459
http://openstreetmap.org/relation/2538329
http://openstreetmap.org/relation/253967
http://openstreetmap.org/relation/3179629
http://openstreetmap.org/relation/9477479
http://openstreetmap.org/relation/946480