# mac install
brew install --cask multipass
#!/bin/bash | |
# You know that really annoying message that pops up... | |
# Mosh: You have 3 detached Mosh sessions on this server, with PIDs: | |
# - mosh [2294539] | |
# - mosh [1874313] | |
# - mosh [2294805] | |
# I often find myself copying this list of PIDs in order to kill them manually |
<?php | |
// Upload to private url or implement authorization... | |
if (isset($_GET["json"])) { | |
header("Content-type: application/json"); | |
exit(json_encode( fpm_get_status() )); | |
} | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<!-- |
This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like
pipewire-debian
, you might get into conflicts.
Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.
Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.
Based on Debian Wiki, but simplified for Ubuntu 22.04.
# screen is useful command as it is included by default on some distributons / operating systemss (eg MacOS). | |
# even if you really like tmux, screen is useful in some situations. Both screen and tmux have a good use cases. | |
# list all screen sessions | |
screen -list | |
# start a command in screen | |
screen -S my_commands_awesome_name -md bash -lc /usr/bin/path_to_my_awesome_command | |
# start a command via ssh in screen |
MYSQL_ROOT_PASSWORD=CHANGE_ME_PLS | |
MYSQL_PASSWORD=CHANGE_ME_PLS | |
MYSQL_USER=domjudge | |
MYSQL_DATABASE=domjudge | |
MYSQL_HOST=db | |
CONTAINER_TIMEZONE=Asia/Jakarta | |
JUDGEDAEMON_PASSWORD_FILE=/judgehost_password |
#!/usr/bin/env ruby | |
# Copyright, All Rights Reserved Henri Shustak 2020 | |
# Released under the GNU/GPL v3 or later licence | |
# | |
# requirements: | |
# - node.js - for hueadm - just install via package macnageer - eg brew.sh | |
# - hueadm - https://github.com/bahamas10/hueadm | |
# - datezone - http://www.fresse.org/dateutils/#datezone | |
# |
#!/usr/bin/env ruby | |
# This script reads a list of PIDs from the command line and dumps all readable memory regions. | |
REGION_PATTERN = /(\h+)-(\h+) (r)/ | |
ARGV.each do |pid| | |
maps = File.open("/proc/#{pid}/maps") | |
mem = File.open("/proc/#{pid}/mem") |
This gist will explain you how to enable an undocumented feature of PHP-FPM
which will give a real-time performance stats.
Everybody knows the famous phpinfo()
and the page it generates, right? Then the real-time PHP-FPM
status page design is very similar.
Some informations from the top are not displayed to avoid security issues.
#!/bin/sh -eu | |
# | |
# Put this script in your ~/bin directory! | |
# | |
: ${HOMEBREW_PREFIX:=/usr/local} | |
export LIBARCHIVE="${HOMEBREW_PREFIX}/opt/libarchive/lib/libarchive.dylib" | |
export LIBCRYPTO="${HOMEBREW_PREFIX}/opt/openssl@1.1/lib/libcrypto.dylib" | |
OPENDROP_GIT="git+https://github.com/seemoo-lab/opendrop.git" |