Skip to content

Instantly share code, notes, and snippets.

View jaredfolkins's full-sized avatar
🧂
💡

Jared Folkins jaredfolkins

🧂
💡
View GitHub Profile
➜ h2demo git:(master) go run -race h2demo.go
2015/03/31 08:53:07 Listening on https://localhost:4430/
2015/03/31 08:53:11 Ignoring frame: [FrameHeader GOAWAY len=8]
==================
WARNING: DATA RACE
Write by goroutine 15:
bytes.(*Buffer).Truncate()
/usr/local/Cellar/go/1.4.2/libexec/src/bytes/buffer.go:62 +0x3b
bytes.(*Buffer).Reset()
/usr/local/Cellar/go/1.4.2/libexec/src/bytes/buffer.go:75 +0x3e
@jaredfolkins
jaredfolkins / gist:778d40cf52b0927c7c69
Last active August 29, 2015 14:19
Using gorename to refactor the gorethink rethinkdb driver.
gorename -from '"github.com/dancannon/gorethink".Db' -to DB -v
gorename -from '"github.com/dancannon/gorethink".DbCreate' -to DBCreate -v
gorename -from '"github.com/dancannon/gorethink".DbDrop' -to DBDrop -v
gorename -from '"github.com/dancannon/gorethink".RqlCompileError' -to ErrRQLCompile -v
gorename -from '"github.com/dancannon/gorethink".RqlRuntimeError' -to ErrRQLRuntime -v
gorename -from '"github.com/dancannon/gorethink".RqlClientError' -to ErrRQLClient -v
gorename -from '"github.com/dancannon/gorethink".RqlDriverError' -to ErrRQLDriver -v
gorename -from '"github.com/dancannon/gorethink".RqlConnectionError' -to ErrRQLConnection -v
@jaredfolkins
jaredfolkins / Lidar_walkthrough.md
Created September 25, 2015 00:03 — forked from YKCzoli/Lidar_walkthrough.md
Lidar_walkthrough

Processing LiDAR to extract building heights

Walk through

Detailed walk through of building extraction using postgis

First lets pull a data layer from of openstreetmap. You can do this any which way you’d like, as there are a variety of methods for pulling openstreetmap data from their database. Check the [wiki] (http://wiki.openstreetmap.org/wiki/Downloading_data) for a comprehensive list. My favourite method thus far is pulling the data straight into QGIS using the open layers plugin. For those who may want to explore this method, check [this tutorial] (http://www.qgistutorials.com/en/docs/downloading_osm_data.html). For building extraction you only need building footprints, and include the building tags. Not all polygons are of type building in OSM, so we can download all the polygons, and then filter the layer for only polygons tagged as buildings.

LiDAR data was pulled from USGS via the Earth Explorer site. [Here] (http://earthobservatory.nasa.gov/blogs/ele

// passes
total = 2147483647 * 2 + 1;
a = new Array(total);
console.log("total:" + total + " length:" + a.length);
// fails
total = 2147483647 * 2 + 2;
a = new Array(total);
console.log("total:" + total + " length:" + a.length);
@jaredfolkins
jaredfolkins / WireGuard_Setup.txt
Created February 6, 2020 01:05 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be