Skip to content

Instantly share code, notes, and snippets.

@ddombrow
ddombrow / osgeo.md
Last active August 29, 2015 13:56
List of Open Source GIS Tools
namespace tryfs
open System
open Owin
open Microsoft.AspNet.SignalR
open Microsoft.Owin.Hosting
// Use ImpromptuInterface for dynamic support in the TryFS.Send method.
// Could also use http://fssnip.net/2U or http://fssnip.net/2V
open ImpromptuInterface.FSharp
<!DOCTYPE html>
<html>
<head>
<script src="http:////cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div>
<svg id="threat" height="200" width="200"></svg>
<!DOCTYPE html>
<html>
<head>
<script src="http:////cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div>
<svg id="threat" height="200" width="200"></svg>
@ddombrow
ddombrow / gist:f3b831d6a56e11826c4a
Last active August 29, 2015 14:02
golang channel question
package main
import (
"fmt"
"net/http"
"sync"
)
type WebResponse struct {
url string
@ddombrow
ddombrow / code.exs
Created October 8, 2016 19:37 — forked from elixirplayground/code.exs
elixirplayground.com code share
defmodule DeLists do
@moduledoc """
This is the Delists module, simple code for simple list operations
"""
@doc """
Sums a list recursively.
Returns the sum of the list.

Keybase proof

I hereby claim:

  • I am ddombrow on github.
  • I am crunchnode (https://keybase.io/crunchnode) on keybase.
  • I have a public key ASCenbYiSjdDz6HBod82U7KlThP-5KT6pUyr7AZRumrh-go

To claim this, I am signing this object:

@ddombrow
ddombrow / gist:e8c199da54e60867986aa53f71f71258
Created January 23, 2018 12:55
make frontmatter for md files
const { promisify } = require("util");
const fs = require("fs");
const readFileAsync = promisify(fs.readFile);
const writeFileAsync = promisify(fs.writeFile);
const readDirAsync = promisify(fs.readdir);
async function doIt() {
let fileList = await readDirAsync(__dirname);
@ddombrow
ddombrow / with-immutable.js
Created March 6, 2018 15:48
HOC and render prop component with memoization to convert immutable props to JS props.
import { Iterable } from "immutable";
import memoize from "fast-memoize";
function deImmutable(immutableProps) {
const KEY = 0;
const VALUE = 1;
return Object.entries(
immutableProps
).reduce((newProps, wrappedComponentProp) => {
newProps[wrappedComponentProp[KEY]] = Iterable.isIterable(
@ddombrow
ddombrow / new-relic-extension.js
Last active September 13, 2018 09:17
New Relic GraphQL extension.
const { GraphQLExtension } = require("graphql-extensions");
const newrelic = require("newrelic");
function traceSummary(trace) {
if (!trace) {
return "No trace data.";
}
try {
const { duration, execution: {resolvers}} = trace;