Skip to content

Instantly share code, notes, and snippets.

View netconstructor's full-sized avatar
💭
pushing pixels

Christian Hochfilzer netconstructor

💭
pushing pixels
View GitHub Profile
@timwaters
timwaters / geoiq_leaflet.htm
Created October 31, 2011 11:34
geoiq geocommons and leaflet
<html><head><title>Geocommons and Leaflet JS</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist>/leaflet.ie.css" /><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<!-- Leaflet JavaScript -->
<script type="text/javascript" src="CloudMade-Leaflet-404b097/dist/leaflet.js"></script>
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]
SELECT rid, band, (stats).* FROM (SELECT rid, band, ST_SummaryStats(rast, band) As stats FROM bioclim10_29 CROSS JOIN generate_series(1,3) As band WHERE rid=2) As foo;
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@tmcw
tmcw / sorted.py
Created November 9, 2011 04:16
Sorted Countries Demo for FOSS4G
#!/usr/bin/python
import shapely, json, math, time
from shapely import speedups, wkb
from shapely.geometry import LineString, Point, Polygon
from osgeo import ogr
from optparse import OptionParser
from math import atan2, degrees, sin, cos
# Be fast if possible.
@hubgit
hubgit / pdftotext.html
Created November 18, 2011 10:37
Embedding the PDFToText service in HTML
<!-- edit this; the PDF file must be on the same domain as this page -->
<iframe id="input" src="your-file.pdf"></iframe>
<!-- embed the pdftotext service as an iframe -->
<iframe id="processor" src="http://hubgit.github.com/2011/11/pdftotext/"></iframe>
<!-- a container for the output -->
<div id="output"></div>
<script>
@ocean90
ocean90 / newinstall.php
Created November 18, 2011 17:42
Drop existing WP install and install a new clean WP
<?php
/* Place the file into WordPress root folder and open the file in your browser. */
/* Settings */
define( 'BLOG_TITLE', 'WordPress Dev' );
define( 'USER_NAME', 'admin' );
define( 'USER_EMAIL', '[email protected]' );
define( 'USER_PASSWORD', '123456' );
define( 'WP_SITEURL', 'http://wp.dev' );
@netconstructor
netconstructor / geoiq_leaflet.htm
Created November 26, 2011 09:24 — forked from timwaters/geoiq_leaflet.htm
geoiq geocommons and leaflet
<html><head><title>Geocommons and Leaflet JS</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="CloudMade-Leaflet-404b097/dist>/leaflet.ie.css" /><![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<!-- Leaflet JavaScript -->
<script type="text/javascript" src="CloudMade-Leaflet-404b097/dist/leaflet.js"></script>
@tecoholic
tecoholic / osm2geo.js
Created November 27, 2011 04:57
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <[email protected]>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*
@netconstructor
netconstructor / admin-menu-challenge.php
Created November 27, 2011 12:08 — forked from mikeschinkel/admin-menu-challenge.php
The Great WordPress Admin Menu Challenge of Jan 2011
<?php
/*
Plugin Name: The Great WordPress Admin Menu Challenge of Jan 2011
Description: <em>"The Great WordPress Admin Menu Challenge of Jan 2011"</em> was inspired by the WordPress team's apparent lack of understanding of the problems addressed by trac tickets <a href="http://core.trac.wordpress.org/ticket/16048">#16048</a> and <a href="http://core.trac.wordpress.org/ticket/16050">#16050</a> <em>(See also: <a href="http://core.trac.wordpress.org/ticket/16204">#16204</a>)</em> and suggestion that the <a href="http://wordpress.org/extend/plugins/admin-menu-editor/>Admin Menu Editor</a> plugin handles the use-cases that the tickets address. Debate spilled over onto Twitter with participation from <a href="http://twitter.com/nacin">@nacin</a>, <a href="http://twitter.com/aaronjorbin">@aaronjorbin</a>, <a href="http://twitter.com/petemall">@petemall</a>, <a href="http://twitter.com/westi">@westi</a>, <a href="http://twitter.com/janeforshort">@janeforshort</a>, <a href="http://twitter.com/PatchesWelcome">@PatchesW