Skip to content

Instantly share code, notes, and snippets.

@drskullster
drskullster / bookmarklet.js
Created March 29, 2024 12:57
Open any balenaCloud device UUID found in the currently selected text
javascript: (() => {
const selectedText = getSelection().toString();
if (selectedText) {
const UUIDs = selectedText
.split(/[\s,]+/)
.filter((UUID) => UUID.match(/[a-zA-Z0-9]{32}/));
if (UUIDs.length) {
UUIDs.map((UUID) => open(`https://dashboard.balena-cloud.com/devices/${UUID}`, '_blank'));
} else {
@drskullster
drskullster / machine.js
Last active February 3, 2021 13:02
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions