Skip to content

Instantly share code, notes, and snippets.

// a first attempt at arduino and C..
// an abstraction for the robodiy robot - only sets speed for now!
#include <Servo.h>
#include <EEPROM.h>
// (only PWM (~) can be written analogous)
// attention: int calcs -> include .0 if float calc needed, or append (float)
@bebbi
bebbi / onPastePlugin.js
Last active February 13, 2019 13:44
slatejs fragment manipulation for custom onPaste behaviour
import { Block, Document } from 'slate'
import { getEventTransfer } from 'slate-react'
import isContainerNode from '../utils/node/isContainerNode'
/*
* What generalizes about this example is that thanks to slatejs #2589 paste
* behaviour is controlled by the fragment's trunk.
*/
const deepestSingleContainer = doc => {
// result holds the found container.