Skip to content

Instantly share code, notes, and snippets.

@shadowdoc
shadowdoc / nikon_ir_pushbutton_photobooth.ino
Created February 3, 2013 15:39
A quick arduino sketch to control a Nikon DSLR via IR LED. Used for a party photobooth.
/*
Nikon IR Photobooth Kit
Marc Kohli
[email protected]
11/11/2012
Changelog:
12/2/12 - Added Debounce code from http://arduino.cc/en/Tutorial/Debounce
Props to David A. Mellis and Limor Fried
@shadowdoc
shadowdoc / mirth e4x to json
Last active May 13, 2021 18:56
Mirth Connect transformer to create json from E4X XML also including the original message
// One way converter from E4X XML to JSON
// 1) turns <body><item>1</item><item>2</item></body> into
// body: {item: ["1", "2"]} so that lists are easier to work with
// 2) turns things like: <body a="a">whatever</body> into
// body: {_a: "a", _: "whatever"}
// however <body>whatever</body> becomes simply body: "whatever
// - attributes specified by ignored are ignored
function E4XtoJSON(xml, ignored) {
var r, children = xml.*, attributes = xml.@*, length = children.length();
if(length == 0) {
@shadowdoc
shadowdoc / vol_by_trainee_stacked_modalities.js
Created July 31, 2014 21:51
Capricorn Trainee Highchart Code
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Total Volume By Trainee'
},