Skip to content

Instantly share code, notes, and snippets.

View fritzvd's full-sized avatar

Fritz van Deventer fritzvd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fritzvd on github.
  • I am fritzvd (https://keybase.io/fritzvd) on keybase.
  • I have a public key whose fingerprint is 5735 97D7 779A 71A2 CFCB E96B A983 83DA EE81 9678

To claim this, I am signing this object:

@fritzvd
fritzvd / addGetSrid.sql
Created October 28, 2014 15:26
sql snippet for older OGR sql function in postgis (getsrid)
CREATE OR REPLACE FUNCTION ST_getsrid(geometry)
RETURNS int4
AS '$libdir/postgis-2.1','LWGEOM_get_srid'
LANGUAGE 'C' IMMUTABLE STRICT;
@fritzvd
fritzvd / performance.js
Created September 13, 2014 10:50
Performance in javascript
// this is wrong
var multiList = [];
multiList += 'string';
multiList += 9;
multiList += 3.14;
// if you really want a list like this do this:
var multiList = ['string', 9 , 3.14];
@fritzvd
fritzvd / leaflet.fullscreen.js
Created March 26, 2014 14:06
leaflet quasi fullscreen on ie
// This is a customisation of a real plugin
// and lives here, purely for reference
L.Control.FullScreen = L.Control.extend({
options: {
position: 'topleft'
},
onAdd: function (map) {
console.info('this is not even fired');
var containerClass = 'leaflet-control-zoom', className, container;
@fritzvd
fritzvd / build.sh
Last active December 12, 2017 09:36
libecw building for gdal
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable # unstable packages
sudo apt-get install build-essential gdal-bin gdal-config libgdal-ecw-src
wget http://meuk.technokrat.nl/libecwj2-3.3-2006-09-06.zip
unzip ~/Downloads/libecwj2-3.3.2006-09-06.zip
cd ~/Downloadslibecwj2-3.3.2006-09-06
./configure
make # wait
make install # or sudo make install
sudo gdal-ecw-build /usr/local
sudo ldconfig
@fritzvd
fritzvd / angular-jqueryui.html
Created June 21, 2013 10:24
Angular JS jQuery UI Slider
<jq-schlider ng-enabled="state.master" at="time.at" max="time.max_timestep"></jq-schlider>
<script>
angular
.module('Components', [])
.directive('jqSchlider', function () {
return {
restrict: 'E',
replace: true,
template: '<div id="schlider"></div>',
@fritzvd
fritzvd / git_tutorial.md
Last active December 14, 2015 14:18
Git workflows

Git for Directors

I started editing a file and forgot to switch branch

git checkout -b forgottoswitch

All modified files are now available in the new branch forgottoswitch

I made changes but want to switch to a branch without committing my changes. Although I might want to go back to changes

@fritzvd
fritzvd / lizard.app.js
Created January 29, 2013 10:22
Voorbeeldje.
Lizard.App.Home = {};
Lizard.App.Home.DefaultView = Backbone.Marionette.ItemView.extend({
template: '#home-template',
className: 'home',
onShow: function() {
console.log('onShow()');
$('.search-query').focus();
},
onDomRefresh: function() {
@fritzvd
fritzvd / gist:4223583
Created December 6, 2012 10:40
Mapfile example
MAP
NAME "whatever"
WEB
IMAGEPATH "/www/"
IMAGEURL "/www/"
METADATA
"wms_title" "whatever"
"wms_enable_request" "*"
"wms_onlineresource" "http://localhost/cgi-bin/mapserv?mapfile=/var/www/thisfile.map&"
@fritzvd
fritzvd / kriging_test.R
Created November 29, 2012 09:48 — forked from anonymous/kriging_test.R
kriging test
#Edzer Pebesma
#> Institute for Geoinformatics (ifgi), University of Münster
#> Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
#> 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
#> http://www.52north.org/geostatistics e.pebesma at wwu.de
#################################################
#krige wil alleen als er geen NA waarden in de data.frame zitten. Heel onhandig
#data(meuse.grid) # only the non-missing valued cells