Skip to content

Instantly share code, notes, and snippets.

View rcoup's full-sized avatar

Robert Coup rcoup

View GitHub Profile
@rcoup
rcoup / compressed-ratelimit.log
Last active August 29, 2015 13:55
$request_time is 0.000 with gzip/chunked? http://forum.nginx.org/read.php?29,246968
View compressed-ratelimit.log
curl -v http://127.0.0.1:8000/big3.html --compressed --limit-rate 10m > /dev/null
access_log:
127.0.0.1 - - [31/Jan/2014:09:38:09 +1300] "GET /big3.html HTTP/1.1" 200 192569263 "-" "curl/7.30.0" "-" 18.316
debug_log:
2014/01/31 09:37:46 [debug] 72800#0: bind() 0.0.0.0:8000 #6
2014/01/31 09:37:46 [notice] 72800#0: using the "kqueue" event method
2014/01/31 09:37:46 [debug] 72800#0: counter: 00000001052E6080, 1
2014/01/31 09:37:46 [notice] 72800#0: nginx/1.5.9
@rcoup
rcoup / companies.py
Last active August 29, 2015 13:56 — forked from NZKoz/companies.rb
View companies.py
import base64
import hashlib
import hmac
import time
from email.utils import formatdate
import requests
HOST="somewhere"
KEY_ID="gimme"
SECRET="ssshhh"
View gist:4e51f69e5b7c4a5d1e81
Proj4:
+proj=utm +zone=36 +ellps=WGS84
GML:
<gml:ProjectedCRS gml:id="ogrcrs1">
<gml:srsName>UTM Zone 36, Northern Hemisphere</gml:srsName>
<gml:baseCRS>
<gml:GeographicCRS gml:id="ogrcrs2">
View keybase.md

Keybase proof

I hereby claim:

  • I am rcoup on github.
  • I am rcoup (https://keybase.io/rcoup) on keybase.
  • I have a public key whose fingerprint is B3D4 4A9C 67EC B138 ED59 A0B2 22F0 2D6F DD91 F295

To claim this, I am signing this object:

@rcoup
rcoup / gpkg_gdal_aspatial.md
Last active August 29, 2015 14:02
Proposal - GeoPackage Aspatial Support Extension
View gpkg_gdal_aspatial.md

Extension Title

Aspatial Support

Introduction

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

Extension Author

@rcoup
rcoup / sigtstp.py
Created October 23, 2014 04:24
Send yourself SIGTSTP to take the user back to a shell, 'fg' to resume
View sigtstp.py
#!/usr/bin/env python
import os, signal
print "About to pause myself, do 'fg' to resume"
os.kill(os.getpid(), signal.SIGTSTP)
print "Resumed!"
View rastersample.mss
To generate
<RasterSymbolizer>
<RasterColorizer default-mode="linear" default-color="white" epsilon="0.001">
<stop color="blue" value = "-1000" />
<stop color="red" value = "-500" mode = "discrete" />
<stop color="yellow" value = "0" />
<stop value = "5" />
<stop color="red" value = "10" />
<stop color="green" value = "15" />
@rcoup
rcoup / gdal_retile.py.diff
Created March 26, 2012 20:23
gdal_retile parallel experiment
View gdal_retile.py.diff
--- swig/python/scripts/gdal_retile.py 2011-11-30 14:28:34.528230721 +1300
+++ swig/python/scripts/gdal_retile.py 2011-12-02 14:25:54.106882681 +1300
@@ -44,6 +44,32 @@
import os
import math
+from Queue import Queue
+
+class DummyPool(object):
+ def __init__(self, *args, **kwargs):
@rcoup
rcoup / nickserv_auth.diff
Created April 15, 2012 23:11
Patch for nagircbot 0.0.33 to support NickServ authentication
View nickserv_auth.diff
--- orig/nagircbot-0.0.33/anna.cpp 2011-01-18 23:39:10.000000000 +1300
+++ anna.cpp 2012-04-16 10:49:13.080360702 +1200
@@ -50,6 +50,7 @@
char *nick = "nagircbot";
char *user = "nagircbot";
char *password = NULL;
+char *nickserv_password = NULL;
int one_line = 1;
char *username = "Nagios IRC Bot " VERSION ", (C) www.vanheusden.com"; /* complete username */
int verbose = 255; /* default is log everything */
@rcoup
rcoup / nearblack-parallel.sh
Last active October 6, 2015 21:48
Parallel version of GDAL's nearblack tool for stripping black/white borders from images.
View nearblack-parallel.sh
#!/bin/bash
USAGE="Runs GDAL nearblack utility over files in a directory tree in parallel.
Usage: $0 SOURCE/ DEST/ [nearblack options]
Recommended/default nearblack options:
-setalpha -white -nb 0 -near 0 -of GTiff -co COMPRESS=DEFLATE -co TILED=YES
See more details on nearblack at: http://www.gdal.org/nearblack.html