Skip to content

Instantly share code, notes, and snippets.

@maiermic
maiermic / coordinates.diagrams.net.svg
Last active November 20, 2021 15:35
mermaid issue: language/API for manual layout and design
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Generated from MultiAlternatives.g4 by ANTLR 4.9
// jshint ignore: start
import antlr4 from 'antlr4';
import MultiAlternativesListener from './MultiAlternativesListener.js';
const serializedATN = ["\u0003\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786",
"\u5964\u0003\u0007=\u0004\u0002\t\u0002\u0003\u0002\u0007\u0002\u0006",
"\n\u0002\f\u0002\u000e\u0002\t\u000b\u0002\u0003\u0002\u0003\u0002\u0007",
"\u0002\r\n\u0002\f\u0002\u000e\u0002\u0010\u000b\u0002\u0003\u0002\u0007",
"\u0002\u0013\n\u0002\f\u0002\u000e\u0002\u0016\u000b\u0002\u0003\u0002",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maiermic
maiermic / copy-to-docker-volume.sh
Created July 24, 2021 16:11
Copy files to Docker volume
# Usage: copy-to-docker-volume SRC_PATH DEST_VOLUME_NAME [DEST_PATH]
copy-to-docker-volume() {
SRC_PATH=$1
DEST_VOLUME_NAME=$2
DEST_PATH="${3:-}"
# create smallest Docker image possible
echo -e 'FROM scratch\nLABEL empty=""' | docker build -t empty -
# create temporary container to be able to mount volume
CONTAINER_ID=$(docker container create -v my-volume:/data empty cmd)
# copy files to volume
version: '3.4'
services:
app:
image: busybox
# keep container running
command: tail -f /dev/null
networks:
- paymentservice_default
- default
code latitude longitude
AB 39.19969535 -76.59393033
BC 35.0526543 -106.6292985
CD 40.19177 -75.91592
DE 32.56212771 -99.63538265
EF 43.60675502 -116.269811
FG 37.103848 -85.3066339
GH 39.986877 -104.799156
HI 31.56917545 -91.23046875
IJ 47.12747 -118.38267
@maiermic
maiermic / rotate_gimbal.py
Created May 30, 2019 08:04
Python example of how to send and receive serial messages from a BaseCam gimbal with SimpleBGC 32-bit controller.
from collections import namedtuple
import serial
import struct
# outgoing CMD_CONTROL - control gimbal movement
ControlData = namedtuple(
'ControlData',
'roll_mode pitch_mode yaw_mode roll_speed roll_angle pitch_speed pitch_angle yaw_speed yaw_angle')
@maiermic
maiermic / update-method-annotations-of-entities.php
Last active November 9, 2018 17:35
Generate PHPDoc @method for magic getters/setters
<?php
// See https://youtrack.jetbrains.com/issue/WI-19869
// require all php files (load class declarations)
$entitiesDirectory = '/path/to/entities';
$files =
new CallbackFilterIterator(
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($entitiesDirectory), RecursiveIteratorIterator::SELF_FIRST),
function (SplFileInfo $current, $key, $iterator) {
version: '3'
services:
frontproxy:
image: traefik
command: --api --docker
ports:
- "80:80"
- "443:443"
volumes:
@maiermic
maiermic / issue description.md
Last active February 18, 2017 12:07
handling lists in cycle.js

@all I try to describe this issue in the following. Please give feedback to improve it.

==

This issue deals with the question how to create dynamic list components.

Issue description

A dynamic list component is a component that consists of a dynamic number of child components (of same kind) in a specific order.