Thanks @seldo and @NurmiWilliam
sudo lsof -iTCP -sTCP:LISTEN -n -P | awk 'NR>1 {print $9, $1, $2}' | sed 's/.*://' | sort -u | while read port process pid; do echo "Port $port: $(ps -p $pid -o command= | sed 's/^-//') (PID: $pid)"; done | sort -n
name: Get Output from Docker | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
Thanks to cereberus on tenforums.com.
Do you have a flash drive that you previously used for a Linux install and now want to use it for a Windows install? Does the flash drive not show up for the Windows installation media? Follow the steps below to wipe the USB flash drive and stage it for Windows.
Open a command prompt/terminal with admin rights and type the following:
diskpart
# create a file on your mac called setup.sh | |
# run it from terminal with: sh setup.sh | |
# heavily inspired by https://twitter.com/damcclean | |
# https://github.com/damcclean/dotfiles/blob/master/install.sh | |
# inspired by https://gist.github.com/chris-sev/45a92f4356eaf4d68519d396ef42dd99 | |
# faster dock hiding/showing (run in terminal) | |
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock |
This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging
loggers, and they both will be processed by the Structlog pipeline (see the hello()
endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id
middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom
Let's say contributor
has submitted a pull request to your (author
) project (repo
). They have made changes on their
branch feature
and have proposed to merge this into origin/master
, where
origin -> https://github.com/author/repo.git
Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called
/etc/systemd/system/iperf3.service
with contents from iperf3.service
sudo systemctl enable iperf3.service
sudo systemctl status iperf3.service
sudo systemctl start iperf3.service
sudo systemctl stop iperf3.service
import base64 | |
import scrypt | |
import os | |
import random | |
# password | |
password = "hashcat" | |
# translation table | |
base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
installing iperf3 and make it start at boot on a ubuntu server.
install iperf3:
sudo apt-get install iperf3
start iperf3 server at startup
Requirements:
Can leverage rpcap
(remote packet capture) protocol supported by Wireshark to capture raw wireless frames from the WLAN NIC used by the WLAN Pi. This can be leveraged to do a packet capture from a WLAN Pi in a remote location.