An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
In all of my coding projects, I like to follow these principles:
#!/bin/bash | |
# | |
# (C) 2021, AG ([email protected]) | |
# BSD 3-Clause License | |
# | |
# Logging and tracing skeleton for Bash shell scripts | |
# | |
# Features | |
# -------- | |
# - Verbose execution tracing to stderr or to a file; optional, via start_trace() |
An easy way to start the embedded PHP web server with the multi-thread option enabled or simulated when necessary.
In all of my coding projects, I like to follow these principles:
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
# Inspired by https://blogging.dragon.org.uk/start-stop-virtualbox-with-systemd/ | |
[Unit] | |
Description=Virtual Box Guest %I | |
After=network.target virtualbox.service zfs-volume-wait.service | |
Before=runlevel2.target shutdown.target | |
[Service] | |
User=root | |
Group=root |
Telegraf plugin to collect up/down/status from Technicolor Cable Modems.
pip install -r reqirements.txt
telegraf-technicolor.py
in /usr/local/bin
or a suitable location to be executed.telegraf-technicolor.py
is executable; chmod +x telegraf-technicolor.py
input.technicolor.conf
to /etc/telegraf/telegraf.d
or Telegraf configuration location on your system. Adjust any settings, locations, etc. therein as needed, perhaps your measurement names.===================================================server====================================================== | |
$ hostnamectl | |
Static hostname: control-machine | |
Icon name: computer-vm | |
Chassis: vm | |
Machine ID: 4f8ea72f17144f5a86367a4aeeb5c3e4 | |
Boot ID: b846f130028d48cb960e5498b75d11ef | |
Virtualization: oracle | |
Operating System: Ubuntu 18.04.1 LTS | |
Kernel: Linux 4.15.0-29-generic |
-- https://www.howtoforge.com/tutorial/ubuntu-desktop-devilspie-2/ | |
debug_print("--------------------------------------------------------------------------------") | |
debug_print("Window Name: ".. get_window_name()); | |
debug_print("Application name: "..get_application_name()) | |
debug_print("--------------------------------------------------------------------------------") | |
editor_workspace = 1 | |
browser_workspace = 2 | |
terminal_workspace = 1 |
The following documents is basically notes on tools, repos, etc. to use for development in Ubuntu. It is devided into sections so that it can be used in pieces, it doesn't need to be followed like a script.
This is likely to end up out-of-date. Things to watch out for:
function num_subjects(alpha, power_level, p, delta) { | |
var t_alpha2 = ppnd(1.0-alpha/2); | |
var t_beta = ppnd(power_level); | |
var sd1 = Math.sqrt(2 * p * (1.0 - p)); | |
var sd2 = Math.sqrt(p * (1.0 - p) + (p + delta) * (1.0 - p - delta)); | |
return (t_alpha2 * sd1 + t_beta * sd2) * (t_alpha2 * sd1 + t_beta * sd2) / (delta * delta); | |
} |