Skip to content

Instantly share code, notes, and snippets.

@ddombrow
ddombrow / influxdb.sh
Created Sep 20, 2020
influx stack in docker run commands
View influxdb.sh
docker run --name influxdb -d -p 8086:8086 -v influxdb:/var/lib/influxdb --net=influxdb influxdb
docker run --name chronograf -p 8888:8888 -v chronograf:/var/lib/chronograf chronograf --influxdb-url=http://influx:8086
docker run -p 9092:9092 --name=kapacitor -h kapacitor --net=influxdb -e KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086 kapacitor
@ddombrow
ddombrow / new-relic-extension.js
Last active Sep 13, 2018
New Relic GraphQL extension.
View new-relic-extension.js
const { GraphQLExtension } = require("graphql-extensions");
const newrelic = require("newrelic");
function traceSummary(trace) {
if (!trace) {
return "No trace data.";
}
try {
const { duration, execution: {resolvers}} = trace;
@ddombrow
ddombrow / with-immutable.js
Created Mar 6, 2018
HOC and render prop component with memoization to convert immutable props to JS props.
View with-immutable.js
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(
View gist:e8c199da54e60867986aa53f71f71258
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);
View keybase.md

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 / code.exs
Created Oct 8, 2016 — forked from elixirplayground/code.exs
elixirplayground.com code share
View code.exs
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.
@ddombrow
ddombrow / gist:f3b831d6a56e11826c4a
Last active Aug 29, 2015
golang channel question
View gist:f3b831d6a56e11826c4a
package main
import (
"fmt"
"net/http"
"sync"
)
type WebResponse struct {
url string
View jsbin.zulirelu.html
<!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>
View jsbin.zulirelu.html
<!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>
View FSharpHub.fs
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