Skip to content

Instantly share code, notes, and snippets.

// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {
@dalekunce
dalekunce / CLAVIN_MVN Error
Created October 23, 2013 02:22
CLAVIN compile error on Ubuntu 12.04
[WARNING]
java.lang.ClassNotFoundException: com.bericotech.clavin.index.IndexDirectoryBuilder
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
at java.lang.Thread.run(Thread.java:679)
[INFO] ------------------------------------------------------------------------
@dalekunce
dalekunce / ubuntugis.sh
Created November 6, 2013 19:14
Ubuntu 12.04 GIS Machine Setup
#add the ubuntugis repo
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
#update stuff
sudo apt-get update
#start with gdal
sudo apt-get install libgdal-dev gdal-bin
#install postgis and libgdal1 to fix a conflict
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"City": "Ormoc"
},
"geometry": {
"type": "Point",
@dalekunce
dalekunce / gifs
Last active August 29, 2015 13:56
http://media.giphy.com/media/4nlK5QgKU8wZW/giphy.gif
West Wing
http://persephonemagazine.com/wp-content/uploads/2013/09/wrongnessandbewrong.gif
http://24.media.tumblr.com/tumblr_m5064d1Ysa1r9i0fuo1_500.gif
The Wire
http://media.giphy.com/media/Mr8Bw7qlrukr6/giphy.gif
http://media.giphy.com/media/5aUbkfOovwW0E/giphy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
#brew will install postgres and postgis using one formula
brew install postgis
initdb /usr/local/var/postgres
@dalekunce
dalekunce / wget files
Created September 30, 2014 02:35
wget multiple files from file
#!/bin/sh
url=$(awk -F = '{print $2}' url.txt)
for i in $(cat file.txt);
do
wget "${url}${i}"
done
@dalekunce
dalekunce / hottask_to_shapefile.sh
Last active August 29, 2015 14:10
hottask_to_shapefile.sh
#!/bin/bash
#######################################################
##
## Created by Dale Kunce: (dale.kunce@redcross.org)
## Download a @hotosm task manager task and output to shapefile.
##
## chmod +x hottask_to_shapefile.sh
## ./hottask_to_shapefil.sh <task#>
##
#######################################################