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/env bash | |
| #set -euo pipefail | |
| # Set up an emergency Jitsi Meet server internally | |
| # Following https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker | |
| if [[ "$(ls jitsi* stable* 2>/dev/null|wc -l)" != 0 ]]; then | |
| echo "Setup is already done/partway done. Only run this script in an empty folder." | |
| 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
| #!/usr/bin/env python3 | |
| """ | |
| deets() { sudo ls "$1"|sed -r "s|^|$1/|"| grep -vP '^/(proc|run|media|mnt)' | xargs sudo du -sh | python3 sum.py ; } | |
| deets / # will show size on each subdir | |
| """ | |
| import sys | |
| import re |
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/env bash | |
| # Simple launcher script for Mindustry | |
| # JDK path is as per Linux | |
| set -euo pipefail | |
| action="${1:-}"; shift || { | |
| echo "specify 'setup', 'build', 'serve' or 'play'" | |
| 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
| mkdir music-stash | |
| cd music-stash | |
| # Assumes you have python installed here | |
| & 'C:\Program Files\Python314\python.exe' -m venv ytdl.venv | |
| .\ytdl.venv\Scripts\activate.bat | |
| & .\ytdl.venv\Scripts\python.exe -m pip install --upgrade pip | |
| & .\ytdl.venv\Scripts\pip.exe install yt-dlp | |
| # This requires admin access: |
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/env bash | |
| set -euo pipefail | |
| [[ "$UID" != 0 ]] || { | |
| echo "Run as regular user with sudo privileges." | |
| exit 1 | |
| } | |
| # From https://docs.docker.com/engine/install/ubuntu/ |
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
| import sys | |
| import re | |
| import argparse | |
| def getargs(): | |
| par = argparse.ArgumentParser() | |
| par.add_argument("--threshold", "-T", default=14, type=float) | |
| par.add_argument("--window-size", "-W", default=10, type=int) | |
| par.add_argument("--verbose", "-V", action="store_true") | |
| return par.parse_args() |
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
| sudo nmcli connection show "Wired connection 1" |grep IP4 |tee ip4-old.txt | |
| sudo nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.110.6/24 | |
| sudo nmcli connection modify "Wired connection 1" ipv4.gateway 192.168.110.1 | |
| sudo nmcli connection modify "Wired connection 1" ipv4.dns "192.168.110.10,192.168.110.11,1.1.1.1" | |
| sudo nmcli connection up "Wired connection 1" | |
| sudo nmcli connection show "Wired connection 1" |grep IP4 |tee ip4-new.txt |
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
| """ | |
| Quick cheat for tcpdump capture and view | |
| packetcap.py capture [-I interface] [-P portslist] PCAPFILE | |
| packetcap.py view [--no-resolve-names|-N] PCAPFILE | |
| To just start capturing packets to a file, run | |
| python3 packetcap.py capture my-packets.pcap |
NewerOlder