Skip to content

Instantly share code, notes, and snippets.

View HeikoBornholdt's full-sized avatar

Heiko HeikoBornholdt

View GitHub Profile
@HeikoBornholdt
HeikoBornholdt / script.js
Created August 28, 2022 21:51
Fox-112 Tweaker
// ==UserScript==
// @name Fox-112 Tweaker
// @namespace https://www.feuerwehr-pinneberg.de/
// @version 1.0
// @description Interface-Verbesserungen für Fox-112
// @author Heiko Bornholdt
// @match https://pinneberg.fox112.de/Fox_Rahmen_EV.php*
// @icon https://www.google.com/s2/favicons?sz=64&domain=fox112.de
// @grant none
// ==/UserScript==
package org.drasyl.node;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.timeout.WriteTimeoutException;
import io.netty.handler.timeout.WriteTimeoutHandler;
import org.drasyl.channel.DrasylChannel;
import org.drasyl.handler.arq.stopandwait.ByteToStopAndWaitArqDataCodec;
import org.drasyl.handler.arq.stopandwait.StopAndWaitArqCodec;
public IIntermediateFuture<ThingDescription> discover() {
IntermediateFuture<ThingDescription> result = new IntermediateFuture<>();
// get all persistence services
AtomicInteger ai = new AtomicInteger();
ITerminableIntermediateFuture<PersistenceService> services = this.agent.getFeature(IRequiredServicesFeature.class).getServices(“PersistenceService");
services.addIntermediateResultListener(service -> {
ai.incrementAndGet();
// get all thing descriptions of this service
IIntermediateFuture<ThingDescription> thingDescriptions = service.getAllObjects(ThingDescription.class);
thingDescriptions.addIntermediateResultListener(thingDescription -> {
@HeikoBornholdt
HeikoBornholdt / docker-cleanup-resources.md
Created August 2, 2018 17:24 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

#!/bin/sh
echo "Executing hook: $0"
cd ${LOCALREPO}
dpkg-scanpackages . /dev/null > Packages
echo "deb file:${LOCALREPO} ./" >> /etc/apt/sources.list
apt-get update

How to install OpenProject on uberspace.de

Follow those steps to install OpenProject on a fresh uberspace.

Step 1: Install dependencies

First we set-up all dependencies. We use ruby 2.1.2 and install gems in a user directory:

echo "gem: --user-install --no-rdoc --no-ri" > ~/.gemrc

cat <<'EOF' >> ~/.bash_profile

LOG 2013-10-26 13:35:47 +0200: Wait until 2013-10-26 14:18:46 +0200 for enough resources
LOG 2013-10-26 13:35:47 +0200: Sleep 2585 seconds (2013-10-26 14:18:51 +0200)
LOG 2013-10-26 14:18:53 +0200: Metallmine (Level 5) next up
LOG 2013-10-26 14:18:53 +0200: Building is constructing until 2013-10-26 14:21:54 +0200
LOG 2013-10-26 14:18:53 +0200: Sleep 186 seconds (2013-10-26 14:21:59 +0200)
LOG 2013-10-26 14:21:59 +0200: Kristallmine (Level 1) next up
LOG 2013-10-26 14:22:02 +0200: Not enough resources (22/48 Metal, 219/24 Crystal, 0/0 Deuterium)
LOG 2013-10-26 14:22:02 +0200: Wait until 2013-10-26 14:24:56 +0200 for enough resources
LOG 2013-10-26 14:22:02 +0200: Sleep 180 seconds (2013-10-26 14:25:01 +0200)
LOG 2013-10-26 14:25:02 +0200: Kristallmine (Level 1) next up
@HeikoBornholdt
HeikoBornholdt / check_duply
Last active December 22, 2015 04:29
Fixed wrong help text
#!/usr/bin/env python
# By Arne Schwabe <[email protected]>
# LICENSE: BSD
from subprocess import Popen,PIPE
import sys
import time
import os
import argparse
//
// NSString+Levenshtein.h
// PyHelp
//
// Modified by Michael Bianco on 12/2/11.
// <http://mabblog.com>
//
// Created by Rick Bourner on Sat Aug 09 2003.
// [email protected]
lang en_US
langsupport en_US
keyboard us
timezone Etc/UTC
text
install
skipx
halt
# Ridiculous URL... I know...