Execute custom install of git and/or force git-shell from ssh.
Relies on using a dedicated SSH key to access the server using git.
#!/bin/sh | |
alias log="logger -p user.info -t services-start" | |
RC='/opt/etc/init.d/rc.unslung' | |
i=30 | |
until [ -x "$RC" ] ; do | |
i=$(($i-1)) | |
if [ "$i" -lt 1 ] ; then | |
log Could not start Entware |
#!/bin/sh | |
# Usage: get_lutron_cert.sh [bridge_ip] | tee cert.pem | |
function error() { | |
echo "Error: $1" >&2 | |
exit 1 | |
} | |
login_server="device-login.lutron.com" |
""" | |
Combination of multiple media players into one for a universal controller. | |
For more details about this platform, please refer to the documentation at | |
https://home-assistant.io/components/media_player.universal/ | |
""" | |
import asyncio | |
import logging | |
# pylint: disable=import-error | |
from copy import copy |
#!/bin/sh | |
# Exit if any unhandled command fails | |
set -e | |
# --- Command line | |
refname="$1" | |
oldrev="$2" | |
newrev="$3" |
Execute custom install of git and/or force git-shell from ssh.
Relies on using a dedicated SSH key to access the server using git.
Hosting multiple websites on a single public IP address on the standard HTTP(S) ports is relatively easy with popular web servers like Apache, Nginx and lighttpd all supporting Virtual Hosts.
For Web Services which bundle their own HTTP server, things get more complicated, unless their HTTP stack can be shared somehow. More often than not, the application's HTTP stack listens directly on a dedicated TCP port.
Hosting multiple services on a single IP then requires using a fronting server listening on the standard HTTP port, and routing to the right backend service based on the host name or the path sent by the client.
Path based routing is cumbersome, usually requiring either the service to be aware of the path prefix, or a rewrite by the HTTP fronting server of all absolute URLs in the requests and responses.
Hostname based routing is more straightforward. The fronting server can just look at the [HTTP/1.1 Host header](https://tools
FROM alpine:edge | |
COPY files / | |
ARG DNSMASQ_UID=100 | |
ARG DNSMASQ_GID=101 | |
ARG user=dnsmasq | |
ARG capabilities=cap_net_raw,cap_net_bind_service | |
# Because Synology is dumb | |
ENV DNSMASQ_UID="${DNSMASQ_UID}" | |
ENV DNSMASQ_GID="${DNSMASQ_GID}" |
const greeters = { | |
'en': 'english', | |
'fr': 'french' | |
}; | |
const promise = (async () => { | |
const greeter = greeters[navigator.language.split('-')[0]]; | |
if (!greeter) { | |
throw new Error('No greeter for you!'); |
(function (global) { | |
var output = null; | |
var buffer = []; | |
var target; | |
function log(msg) { | |
if (!output) { | |
buffer.push(msg); | |
return; | |
} |
let target = {}; | |
let wr = new WeakRef(target); | |
let fg = new FinalizationGroup((iter) => { | |
for(const i of iter) { | |
log(i); | |
} | |
}); | |
fg.register(target, "hello world"); | |
target = null; | |
setTimeout(gc, 0); |