Skip to content

Instantly share code, notes, and snippets.

View aaronr's full-sized avatar

Aaron Racicot aaronr

View GitHub Profile
@aaronr
aaronr / cool_xml.xml
Created January 12, 2017 18:58
This is my cool gist
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>{{ site.name }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}</link>
{% for post in site.posts limit:10 %}
<item>
@aaronr
aaronr / mapbox.xml
Created April 2, 2015 17:11
mapbox.xml - Replace mapbox key with yourown
<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://a.tiles.mapbox.com/v3/reprojected.ldn521ho/${z}/${x}/${y}.png</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-20037508.34</UpperLeftX>
<UpperLeftY>20037508.34</UpperLeftY>
<LowerRightX>20037508.34</LowerRightX>
<LowerRightY>-20037508.34</LowerRightY>
<TileLevel>18</TileLevel>
aaronr@linode:~$ ogr2ogr -f "GeoJSON" /vsistdout/ PG:dbname=test ne_admin_bounds -where "name = 'United States'" | gj2ascii -
FID: 0
Min X: -171.791110603
Max X: -66.96466
Min Y: 18.91619
Max Y: 71.3577635769
+ + + + + + +
+ + + + + + + + +
aaronr@linode:~$ ogr2ogr -f "GeoJSON" /vsistdout/ PG:dbname=test ne_admin_bounds -where "name = 'United States'" | mapfart
http://mapfart.com/fart_LgkZaj
aaronr@linode:~$ ogr2ogr -f "GeoJSON" /vsistdout/ PG:dbname=test ne_admin_bounds -where "name = 'United States'" | gj2ascii
Usage: gj2ascii [OPTIONS] INFILE [OUTFILE]
Error: Missing argument "infile".
aaronr@linode:~$ ogr2ogr -f "GeoJSON" /vsistdout/ PG:dbname=test ne_admin_bounds -where "name = 'United States'" > tmp.geojson
aaronr@linode:~$ gj2ascii tmp.geojson
FID: 0
import os
import csv
extra = [
'extra_column',
]
csvfile = open(os.path.join(options.output_directory,options.output_name+'.csv'), "wb")
writer = csv.writer(csvfile, delimiter=',')
header = ['id','Longitude','Latitude','path']
Downloading/unpacking cracklib==2.8.19 (from -r requirements.txt (line 65))
Downloading cracklib-2.8.19.tar.gz
Running setup.py egg_info for package cracklib
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./erma/lib/python2.6/site-packages (from python-daemon==1.6->-r requirements.txt (line 48))
Installing collected packages: cracklib
Running setup.py install for cracklib
building '_cracklibmodule' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/local/include -I/usr/include -I/usr/include/gdal -fPIC -I../lib -I/usr/include/python2.6 -c _cracklibmodule.c -o build/temp.linux-x86_64-2.6/_cracklibmodule.o
_cracklibmodule.c:40:19: error: crack.h: No such file or directo
z-air:decoder aaronr$ ./quadproc.py --help
Usage: quadproc.py [options]* arg1 [arg]*
Options:
-h, --help show this help message and exit
-v, --verbose Verbose output
-q, --quiet Quiet output
-d, --debug Enable debug output
FlyTrex Options:
z-air:decoder aaronr$ ./quadproc.py --help
Usage: quadproc.py [options]* arg1 [arg]*
Options:
-h, --help show this help message and exit
-v, --verbose Verbose output
-q, --quiet Quiet output
-d, --debug Enable debug output
FlyTrex Options:
z-air:decoder aaronr$ ./quadproc.py -f 00000004.FPV | head -n 10
2014-10-03 17:01:04,47.787739,-122.1410896,131.8405554
2014-10-03 17:01:04,47.7877395,-122.1410903,129.8064346
2014-10-03 17:01:05,47.7877394,-122.1410912,129.98031912
2014-10-03 17:01:05,47.7877389,-122.1410923,130.95144776
2014-10-03 17:01:05,47.7877379,-122.1410933,132.70341632
2014-10-03 17:01:05,47.7877374,-122.1410941,133.57611976
2014-10-03 17:01:06,47.787737,-122.1410947,134.81955812
2014-10-03 17:01:06,47.7877367,-122.1410959,135.75131668
2014-10-03 17:01:06,47.7877367,-122.1410964,136.12861328
@aaronr
aaronr / gist:c0e3ce269d984b07ce99
Created December 2, 2014 19:58
Parsing the Flytrex binary file
z-air:decoder aaronr$ ls 00000004.FPV
00000004.FPV
z-air:decoder aaronr$ ./flytrex.py | more
2014-10-03 17:01:04
GPS Data - -122.1410896 47.787739 131.8405554f
2014-10-03 17:01:04
GPS Data - -122.1410903 47.7877395 129.8064346f
2014-10-03 17:01:05
GPS Data - -122.1410912 47.7877394 129.98031912f
2014-10-03 17:01:05