Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Ceronio mydoghasworms

View GitHub Profile
@mydoghasworms
mydoghasworms / json_util.abap
Last active Nov 30, 2020
ABAP Utility class for mapping JSON to ABAP data and vice versa - Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47
View json_util.abap
* Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47
* The alternative is a better parser although it is not an emmitter)
*----------------------------------------------------------------------*
* CLASS json_util DEFINITION
*----------------------------------------------------------------------*
class json_util definition.
public section.
class-methods:
data_to_json importing data type any
returning value(json) type string,
@alandipert
alandipert / midi.clj
Created Mar 31, 2010
Play music with Clojure and javax.sound.midi
View midi.clj
(import '(javax.sound.midi MidiSystem Synthesizer))
(defn play-note [synth channel note-map]
(let [{:keys [note velocity duration]
:or {note 60
velocity 127
duration 1000}} note-map]
(. channel noteOn note velocity)
(Thread/sleep duration)
(. channel noteOff note)))