This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
ts_patt = "[0-9][0-9]:[0-5][0-9]:[0-5][0-9],[0-9]+" | |
split("99:59:59,999", limits, ":|,") | |
from = 1 | |
to = 999999999 | |
delay[hours = 1] = 0 | |
delay[minutes = 2] = 0 # 0-59 | |
delay[seconds = 3] = 0 # 0-59, positive = show subtitle later, negative = show subtitle sooner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wget -O - https://gist.github.com/samunders-core/089b081707576c2692ce6c52a411aea2/raw/ |\ | |
# sed -re '/(FROM|MAINTAINER|RUN)/d' -e 's|ENV|export|' -e '$a su -s /bin/sh ${U}' -e '/^EXPOSE/,$d' | /bin/sh | |
# | |
# # execute following as ${U}: | |
# sed -re '1{s|$|\npgrep -f "mono.*OpenRA.Server.exe.*Mod=" \&\& exit 0\ncd '"${B}"'\nexec\\|;p} 1,/while true; do/d; /done/,$d' ${B}/launch-dedicated.sh > ${H}/${U}.sh\ | |
# chmod +x ${H}/${U}.sh && echo "* * * * * ${H}/${U}.sh" | crontab - && exit | |
FROM alpine:latest | |
MAINTAINER sam_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# https://joost.oostdijk.net/articles/service-configuration-with-procd/ | |
# runs until first stall/disconnect of recovery taking longer than 60 seconds | |
INTERNET_ADDRESS=8.8.8.8 | |
IFACE="${1:-LTE}" | |
SECONDS=${2:-10} | |
[ -z "${IFACE}" ] && { | |
/bin/echo -e "Usage: iface_watchdog <interface> [poll_each_seconds]\nChecks+reconnects stalled/disconnected interface" | /usr/bin/logger -s | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef UNMANGLE_H | |
#define UNMANGLE_H | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
egrep -aHo '[-0-9a-zA-Z_@]+:.*' "$@" | \ | |
awk ' | |
$0 == $1 { | |
group=$1 | |
next | |
} | |
{ | |
print group""substr($0,index($0, ":") + 1) |
NewerOlder