Skip to content

Instantly share code, notes, and snippets.

@yonkeltron
yonkeltron / SketchSystems.spec
Created April 25, 2019 18:25
Facets DQM Billing EFT Match
Facets DQM Billing EFT Match
Idle*
Receive Claim from FODS -> Processing Claim
Processing Claim
Query FCTS for Candidate Matches*
Candidate Matches Found -> Generate XML
No Candidate Matches Found -> Undefined
Generate XML
Success -> SAP SOAP Call for Matched Provider
Failure -> Undefined
Propane
Idle*
configure -> Configuring
help -> Help
error -> Logging Error
Configuring
Updating Packages
finished -> Configuring Certificates
failed -> Logging Error
Configuring Certificates
Propane
Idle*
configure -> Configuring
help -> Help
Configuring
Updating Packages
finished -> Configuring Certificates
failed -> Logging Error
Configuring Certificates
finished -> Indicating Success
SK Action
Listening*
receive message -> Handling Message
Handling Message
Contractify*
passed contract -> Processing
failed contract -> Queue Error
Processing
finished -> Emitting Response
Queue Error
@yonkeltron
yonkeltron / mix.exs
Last active February 22, 2019 08:30
OpenTracing in Elixir with Otter
defmodule Ot.Mixfile do
use Mix.Project
def project do
[app: :ot,
version: "0.1.0",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
@yonkeltron
yonkeltron / SketchSystems.spec
Last active November 12, 2018 02:12
Skyline Action
Skyline Action
Listening
receive message -> Processing
Processing
finished processing -> Emitting
Emitting
finished emitting -> Tracing
Tracing
finished tracing -> Listening
@yonkeltron
yonkeltron / hello_world.mzn
Last active May 16, 2018 13:04
I fixed it!
int: nt = 10;
var 1..nt: solution;
constraint solution < nt;
solve satisfy;
output ["solution = ", show(solution)];
n = 50000
Rehearsal ----------------------------------------------
vanilla 2.980000 0.940000 3.920000 ( 4.703619)
pipelined 0.820000 0.160000 0.980000 ( 0.976310)
hmapped 0.160000 0.000000 0.160000 ( 0.228029)
------------------------------------- total: 5.060000sec
user system total real
vanilla 3.000000 0.940000 3.940000 ( 4.718813)
pipelined 0.800000 0.140000 0.940000 ( 0.945136)
@yonkeltron
yonkeltron / README.md
Created May 8, 2013 13:16
A proof-of-concept parser for Heroku's Postgres metrics logs written in Ruby using the Parslet gem.

Backstory

While tailing the logs for a Rails app running on Heroku, I noticed some funky entries which showed up. While these frightened me at first, some fine Herokoid data engineers assured me that my PostgreSQL database hadn't suffered trauma but was showing off the Heroku Postgres metrics logs feature.

To aid in the digestion of this neato data, I've taken the liberty of

@yonkeltron
yonkeltron / actor.js
Created December 17, 2010 14:57
Actor-like lib for objects in node.js
var _ = require('underscore')._,
events = require('events');
var Actor = function Actor(object) {
var postman = new events.EventEmitter(),
mailbox = [],
that = this,
monitor = function monitor() {
var data = mailbox.shift();
if (data) {