Skip to content

Instantly share code, notes, and snippets.

Avatar

Derick Rethans derickr

View GitHub Profile
@derickr
derickr / leaflet-side-by-side.html
Created Sep 5, 2011 — 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
View leaflet-side-by-side.html
<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 {
View gist:1444009
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)) {
View gist:4202205
db.logs.aggregate({ $match : { method : "POST" }, $group : { _id : "$method" }})
View classifier.php
<?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 Nov 26, 2013 — forked from chx/nato
View 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
View gist:c99f833b919fb2028cdc
<?php
$c = (new MongoClient())->demo->points;
$c->find( [
'loc' => [
'$geoWithin' => [
'$geometry' => [
'type' => 'Polygon',
'coordinates' => [ [
[ -0.91, 51.74 ],
View gist:296a8f154d93cdf09146
<?php
$c = (new MongoClient())->demo->points;
$c->find( [
'loc' => [
'$geoWithin' => [
'$geometry' => [
'type' => 'Polygon',
'coordinates' => [ [
[ -0.91, 51.74 ],
View gist:675d9a66c822fb67a9f9
Verifying that +derickr is my blockchain ID. https://onename.com/derickr
View pubs.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

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: