Skip to content

Instantly share code, notes, and snippets.

View jasonkuhrt's full-sized avatar
🏔️
Building Prisma Cloud

Jason Kuhrt jasonkuhrt

🏔️
Building Prisma Cloud
View GitHub Profile
@jasonkuhrt
jasonkuhrt / sendgrid-api-notes.md
Created October 5, 2017 16:26
sendgrid-api-example.md

Read reserved field names. Custom fields names that collide with any of these are invalid.

curl --request GET \
  --url https://api.sendgrid.com/v3/contactdb/reserved_fields \
  --header 'authorization: Bearer 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' \
  --data '{}'
{
  "reserved_fields": [
@jasonkuhrt
jasonkuhrt / test.js
Created May 16, 2017 18:06
menu-tree.js
const F = require("lodash/fp")
const util = require("util")
const log = x => console.log(util.inspect(x, { colors: true, depth: null }))
log.step = () => console.log("============================================")
const Tree = {
createLeaf: value => ({ trunk: null, value }),
appendLeaf: (leaf, tree) => {
if (!tree.branches) tree.branches = []
@jasonkuhrt
jasonkuhrt / test.js
Created May 16, 2017 17:30
menu-example.js
const F = require("lodash/fp")
const util = require("util")
const log = x => console.log(util.inspect(x, { colors: true, depth: null }))
log.step = () => console.log("============================================")
const Tree = {
createLeaf: value => ({ trunk: null, value }),
appendLeaf: (leaf, tree) => {
if (!tree.branches) tree.branches = []
@jasonkuhrt
jasonkuhrt / test.js
Created May 16, 2017 17:26
menu-tree.js
const F = require("lodash/fp")
const util = require("util")
const log = x => console.log(util.inspect(x, { colors: true, depth: null }))
log.step = () => console.log("============================================")
const Tree = {
createLeaf: value => ({ trunk: null, value }),
appendLeaf: (leaf, tree) => {
if (!tree.branches) tree.branches = []
@jasonkuhrt
jasonkuhrt / terraform-v0.6.3.adoc
Created May 3, 2017 00:04
terraform-v0.6.4-review.adoc

Review | Terraform v0.6.3

@jasonkuhrt
jasonkuhrt / main.js
Created January 6, 2017 03:57
Monitor.js
import * as FRP from "most"
import { ping } from "./Ping"
const eventTypeUpdater = (type) => (event) => (
Object.assign({}, event, {
type,
})
)
@jasonkuhrt
jasonkuhrt / with-base-tag.html
Last active October 28, 2016 19:30
Base tag breaks anchor links
<!-- Clicking the anchor link will reload the page to root. -->
<html>
<head>
<base href="/">
</head>
<body>
<a href="#">Hey, hash-link here. Help! I'm broken.</a>
</body>
</html>
@jasonkuhrt
jasonkuhrt / ForecastHours.hs
Last active October 6, 2016 14:34
FromJSON WeatherPoint
{-# LANGUAGE OverloadedStrings #-}
{- README
This module contains functions for creating a textual visualization of hourly-forecast data. An example of what the visualization looks like:
12 Hour Weather Forecast
━━━━━━━━━━━━━━━━━━━━━━━━
↗ Montreal
@jasonkuhrt
jasonkuhrt / Main.hs
Created September 24, 2016 01:41
haskell-trie
data Trie a = Twig | Branch a (Trie a) (Trie a)
deriving (Show)
main :: IO ()
main = do
print trieExample
print . toList $ trieExample
@jasonkuhrt
jasonkuhrt / main.js
Created September 8, 2016 19:23
node-tcp-netcat-error
import TCP from "net"
import Promise from "Bluebird"
const log = console.log
/* TODO