Skip to content

Instantly share code, notes, and snippets.

@bmount
bmount / hgt_png_snip
Last active December 11, 2015 07:59
piece of srtm San Francisco area in grayscale png
checked in raw
<!DOCTYPE html>
<meta charset="utf-8">
<style>
html {
font-family: Helvetica;
}
path {
@bmount
bmount / read_srtm_hgt.js
Last active December 10, 2015 23:28
Reading SRTM hgt files in JavaScript
f = require('fs')
h = f.readFileSync('sfoak_srtm_vox.buf')
// read the (1/4 over, 1/4th down) point, 2nd arg would be 3601* 500 + 100 for 50th x in 250th row (2 bytes per record):
g = new DataView(h, Math.pow(2, 3601)/2, 1000)
> g.getInt16(0, true)
97
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
@bmount
bmount / trb_feedback.md
Created November 22, 2012 13:27
TRB Feedback

The Assembly and Interpretation of Transit Data

A freeway, Tilton warned, "is a device which can make or break the city. It can liberate or contribute to congestion. It can cut the city into unrelated parts, or bind it together. It can destroy values, or create new ones. The State cannot soundly develop its urban freeway plans without attention to the planning problems of the city itself." Tilton criticized the state for a narrow approach that considered merely "the assembly and interpretation of traffic data...

@bmount
bmount / sfbuildratio.md
Created November 5, 2012 21:25
San Francisco building footprint ratio

Quick look at proportion of land within SF that is covered by a structure according to city building footprint data. This excludes interior courtyards, uncovered ground-level parking, ie everything without a roof.

Area measurements in square meters, excluding the bay and lakes (census tracts may include bodies of water, this compares only land area.)

Zoom in to see the census tract outline. Also, some of the numbered links are bad, if so try the 'unbroken link'.

@bmount
bmount / designcodes.md
Created October 20, 2012 10:14
differences between different kinds of design codes

1911 tenement

"The discoveries of the last few years have radically altered our methods of treatment of sewage, both within and without the building. We have through these discoveries, learned why it is that sewage must be quickly removed from our neighborhood instead of being allowed to remain in cesspools... The science of bacteriology has become to the sanitary engineer, in a certain sense, the most

@bmount
bmount / datafirst.md
Created October 17, 2012 00:05
Data before APIs before Applications

This is a little feedback for people implementing open government (geo-) data projects — the good guys, like Bronwyn Agrios and Jay Nath. I had a little interaction today with some of you, related to a pedestrian safety dataset and interactive map:

@jay_nath @ajturner @bronwynagrios @shannonspanhake It takes more time for a programmer to figure out that API than to make a better map...

— Brian Mount (@brian_mount) October 15, 2012
@bmount
bmount / postgres_plist.xml
Created June 15, 2012 00:49
postgres plist a la homebrew
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.pg92beta.plist</string>
<key>ProgramArguments</key>
<array>
@bmount
bmount / conway.c
Created June 15, 2012 00:48
game of life
#include <stdio.h>
#include <stdlib.h>
#define X 121
#define Y 51
// Conway's Game of Life
// make conway && ./conway
// change X and Y for display area