Skip to content

Instantly share code, notes, and snippets.

View stonerl's full-sized avatar

Toni Förster stonerl

  • University of Tübingen
View GitHub Profile
@stonerl
stonerl / create_forked_task.R
Created August 3, 2022 17:11 — forked from jcheng5/create_forked_task.R
Concurrent, forked, cancellable tasks in Shiny
library(shiny)
# Also uses parallel, shinyjs, tools
# Create a long-running task, executed in a forked process. (Doesn't work on Windows)
#
# The return value is a promise-like object with three
# methods:
# - completed(): FALSE initially, then TRUE if the task succeeds,
# fails, or is cancelled. Reactive, so when the state changes
# any reactive readers will invalidate.
@stonerl
stonerl / collectd-get-lantiqdsl-values
Created December 27, 2020 20:12
set of scripts to collect Lantiq DSL line values via collectd-mod-exec
#!/bin/sh
[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh || exit 0
HOSTNAME=$(cat /proc/sys/kernel/hostname)
VALUESFILE=/tmp/collectd-lantiqdsl-values
dsl_val() {
echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*')