Skip to content

Instantly share code, notes, and snippets.

View derickr's full-sized avatar

Derick Rethans derickr

View GitHub Profile
@derickr
derickr / leaflet-side-by-side.html
Created September 5, 2011 11:26 — forked from andrewharvey/leaflet-side-by-side.html
Demo web app displaying two web maps side by side in sync with each other based on Leaflet
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file is licenced CC0 http://creativecommons.org/publicdomain/zero/1.0/
-->
<head>
<title>Leaflet Maps Side by Side</title>
<link rel="stylesheet" href="/javascript/leaflet/leaflet.css" type="text/css" />
<!--[if lte IE 8]><link rel="stylesheet" href="/javascript/leaflet/leaflet.ie.css" /><![endif]-->
<style type="text/css">
body {
@derickr
derickr / gist:1444009
Created December 7, 2011 18:33
Example diff
diff --git a/igbinary.c b/igbinary.c
index d439da7..64a2aa7 100644
--- a/igbinary.c
+++ b/igbinary.c
@@ -918,11 +918,15 @@ inline static int igbinary_serialize_array(struct igbinary_serialize_data *igsd,
switch (key_type) {
case HASH_KEY_IS_LONG:
- igbinary_serialize_long(igsd, key_index TSRMLS_CC);
+ if (igbinary_serialize_long(igsd, key_index TSRMLS_CC)) {
db.logs.aggregate({ $match : { method : "POST" }, $group : { _id : "$method" }})
<?php
error_reporting(E_ALL);
define('NUM_FEATURES', 3);
// My dataset describes cities around the world where I might consider living.
// Each sample (city) consists of 3 features:
// * Feature 1: average low winter temperature in the city
// * Feature 2: city population, in millions
@derickr
derickr / nato
Created November 26, 2013 13:29 — forked from chx/nato
#!/bin/bash
declare -A nato
nato[A]=Alpha
nato[B]=Bravo
nato[C]=Charlie
nato[D]=Delta
nato[E]=Echo
nato[F]=Foxtrot
nato[G]=Golf
nato[H]=Hotel
<?php
$c = (new MongoClient())->demo->points;
$c->find( [
'loc' => [
'$geoWithin' => [
'$geometry' => [
'type' => 'Polygon',
'coordinates' => [ [
[ -0.91, 51.74 ],
<?php
$c = (new MongoClient())->demo->points;
$c->find( [
'loc' => [
'$geoWithin' => [
'$geometry' => [
'type' => 'Polygon',
'coordinates' => [ [
[ -0.91, 51.74 ],
Verifying that +derickr is my blockchain ID. https://onename.com/derickr
@derickr
derickr / pubs.geojson
Created January 7, 2019 13:38
Pubs in Brent
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am derickr on github.
  • I am derickr (https://keybase.io/derickr) on keybase.
  • I have a public key whose fingerprint is 5A52 8807 81F7 5560 8BF8 15FC 910D EB46 F53E A312

To claim this, I am signing this object: