Skip to content

Instantly share code, notes, and snippets.

@glw
glw / load_shp_to_AWS
Last active June 21, 2024 18:52
load shapefile into Amazon RDS PostGIS
shp2pgsql -s 4326 -d -g the_geom shapefilename.shp shapefilename |psql -U username --password -p 5432 -h reallylonghostnametoamazonaws.com dbname
@glw
glw / soution_failed_guestaddition
Last active February 27, 2018 19:31
common solution to vituralbox guest addition failed install
#from ubuntu installation
sudo apt-get install dkms build-essential linux-headers-generic gcc make
#for ubuntu 14.04 it may be necessary to install the following...when prompted choose yes for new install.
sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
@glw
glw / pgrouting isocrone attempt
Last active January 2, 2016 11:18
What I did.
#upload python script here https://github.com/glw/chicagodivvybikes.git to download divvy bike station data. output it geojson file. I choose geojson so that I could re-use this script for other projects that will require geojson.
#geojson to shpfile
ogr2ogr -f "ESRI Shapefile" divvy_stations.shp divvybikestations.geojson
#shpfile to sql
shp2pgsql -s 4326 -I divvy_stations.shp divvy_stations > divvy_stations.sql
#Download Chicago OSM streets: XML format
wget http://osm-extracted-metros.s3.amazonaws.com/chicago.osm.bz2
@glw
glw / bash commands
Last active July 18, 2017 20:11
Useful Bash commands
# recusively copy files from sub-directories into the parent
$ find ./recursive_search/ -name '*.txt' -exec cp --backup=numbered -t ./ {} +
==========================================================================================================
#how to create a install script http://askubuntu.com/questions/47404/how-do-i-make-post-install-scripts
===========================================================================================================
#how to find install name