Skip to content

Instantly share code, notes, and snippets.

View ryansname's full-sized avatar

Ryan Lewis ryansname

  • Biomatters
  • Auckland
View GitHub Profile
[root]
name = "example"
version = "0.1.0"
dependencies = [
"iron 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "conduit-mime-types"
version = "0.7.3"
@ryansname
ryansname / main.rs
Created March 12, 2015 07:23
Hyper server blocks when dropped
#![feature(net)]
extern crate hyper;
use hyper::server::{Fresh, Request, Response, Server};
use std::net::{IpAddr};
fn main() {
// Set up the server
let mut listening_server = Server::http(move |_: Request, handler_res: Response<Fresh>|
@ryansname
ryansname / gpkg_gdal_aspatial.md
Last active August 29, 2015 14:02 — forked from rcoup/gpkg_gdal_aspatial.md
Proposal - GeoPackage Aspatial Support Extension

Extension Title

Aspatial Support

Introduction

Support for aspatial data (ie. SQLite tables/views without a geometry column), potentially with associated metadata.

Extension Author

@ryansname
ryansname / gist:5051718
Last active December 14, 2015 07:38
Updated to test only the specific class load that takes 60% of the total startup time.
#! /bin/bash
cd "$(dirname "$0")"
outfile='output.prof'
echo -e "from dandelion.utils.browsers import BrowserCapabilities\nimport cProfile\ncProfile.run('BrowserCapabilities()', '$outfile')\n" | python
echo -e "import pstats\np = pstats.Stats('$outfile')\np.sort_stats('time').print_stats(50)" | python
@ryansname
ryansname / strict-dependencies.diff
Created January 22, 2013 00:59
This makes the build .deb package depend on the exact version of nodejs and libmapnik that it was built against, as was described here https://github.com/mapbox/tilemill/issues/1700#issuecomment-9327743.
--- a/platforms/ubuntu/debian/rules
+++ b/platforms/ubuntu/debian/rules
@@ -22,3 +22,7 @@ build:
include /usr/share/cdbs/1/rules/debhelper.mk
+nodeVersion = $(shell dpkg -p nodejs | grep Version: | awk '{print $$2}')
+mapnikVersion = $(shell dpkg -p libmapnik | grep Version: | awk '{print $$2}')
+
+DEB_DH_GENCONTROL_ARGS_ALL = -- -Vtilemill:Depends="nodejs (=$(nodeVersion)), libmapnik (=$(mapnikVersion))"
@ryansname
ryansname / millstone.diff
Created December 18, 2012 00:14
Changes required in tilemill and millstone for tilemill-symbol-list to work correctly
diff --git a/lib/millstone.js b/lib/millstone.js
index 562bbf5..f4da54e 100644
--- a/lib/millstone.js
+++ b/lib/millstone.js
@@ -905,6 +905,8 @@ function flush(options, callback) {
module.exports = {
resolve: resolve,
+ cachepath: cachepath,
+ localize: localize,
@ryansname
ryansname / Missing
Created December 21, 2011 00:49
coordinate systems missing esri_wkt
srid | name | srtext
--------+-------------------------------------------------------+--------------------------------------------------------------------------------------------