Skip to content

Instantly share code, notes, and snippets.

@honewatson
honewatson / synthetic-agent-install-2016.md
Last active August 20, 2019 07:01
AppDynamics Synthetic Agent Install

Requirements

  • A license for Synthetic Private Agents ( not included in Synthetic Server Monitoring )
  • Processor: 2 GHz
  • Memory: 4 GB RAM
  • Disk Space: 40 GB
  • Dedicated host
  • Windows Server 2012 64-Bit or Windows Server 2012 R2 64-Bit (Only English version)
  • Microsoft .NET Framework 4.7 or greater
  • SaaS: https://synthetic.api.appdynamics.com:443;
@honewatson
honewatson / npm ERR! internalBinding is not defined.md
Last active March 13, 2019 02:10
npm ERR! internalBinding is not defined

This can be a conflict with 'n' version of npm and /usr/local version of npm

rm /usr/local/bin/npm
ln -s ~/.node/bin/npm /usr/local/bin/npm
@honewatson
honewatson / example.py
Created February 25, 2019 04:46
Pydantic Union Example
from typing import List, Union
from pydantic import BaseModel
from pydantic.dataclasses import dataclass
class MyConfig:
validate_assignment = True
@dataclass(config=MyConfig)
@honewatson
honewatson / compose.js
Created October 4, 2018 23:32
Betters Stack Traces For Javascript FP
const warningMessage = (fn) =>
`Error running function '${fn.name}' with args:`
const composeReducer = (f, g) => (...args) => {
var fResult, gResult;
try {
gResult = g(...args);
} catch (e) {
console.warn(warningMessage(g), args);
throw e;
@honewatson
honewatson / .babelrc
Last active July 27, 2018 06:54
Remove flow types from code base
{
"plugins": ["syntax-jsx", "syntax-object-rest-spread", "transform-flow-strip-types"]
}
@honewatson
honewatson / elm.nim
Created July 4, 2018 13:33
Nim Karax Elm Architecture Example
include karax / prelude
import strutils
type
Model = object
counter*: int
Dispatch = proc(model: Model): void
proc init(): Model =
result = Model(counter: 0)
import json
import marshal
import options
type
Message = object
id: int
message: string
OptionalMessage = object
id: int
@honewatson
honewatson / license.md
Last active August 28, 2018 22:59
Recursive Tree Transducer

Copyright 2018 Hone Watson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER