docker run -d --restart unless-stopped -it -p 30767:8767 -v $PWD/devsub:/src/devsub --mount src=shared_htdocs,dst=/out,volume-subpath=devlogs python python /src/devsub
HOST=maindev ; CONT=someapp ; on -n
| # Paste this at end of .bashrc | |
| # Replacing "On branch" with " " makes sure the branch-name sorts first in `sort -u` | |
| # sort -u removes duplicate x!? chars. for multiple deleted / modified / unknown files | |
| # final sed strips leading space and linebreaks and adds [] | |
| function fast_git_ps1 { | |
| git status 2>&1 | sed -En ' | |
| /On branch/ {s/On branch / /; s/$/ /; H} | |
| /deleted:/ {s/.*/x/; H} |
docker run -d --restart unless-stopped -it -p 30767:8767 -v $PWD/devsub:/src/devsub --mount src=shared_htdocs,dst=/out,volume-subpath=devlogs python python /src/devsub
HOST=maindev ; CONT=someapp ; on -n
| # Get a current list of repos. | |
| gh search repos --limit 1000 @tbnorth | sed 's/\s.*//' | tee repos.list.202510 | |
| # Get a list of workflows including repo. names. | |
| < repos.list.202510 xargs -IF bash -c 'echo REPO F ; gh workflow list --repo F' \ | |
| | tee workflows.list.202510 | |
| # Disable all active workflows. |
The script assumes:
a) you have something like defined:
export maindev=maindev
export bkupdev=bkupdev
export mainstg=mainstg
export bkupstg=bkupstg
export mainprod=mainprod| #!/usr/bin/env python3 | |
| """Local repo cleanup""" | |
| import re | |
| import sys | |
| from subprocess import run | |
| specified_permanent = [] | |
| for arg in sys.argv: | |
| if arg.startswith("--permanent="): | |
| specified_permanent = arg.split("=", 1)[1].split(",") |
| Hyperwood Exchange Format | |
| Version 1 | |
| hyperwood.org | |
| SimpleTable | |
| {"width":14,"depth":23,"height":11} | |
| {"x":0.035,"y":0.016,"z":0.035} | |
| {"width":0.489,"depth":0.3651,"height":0.3842} | |
| 4 | |
| Leg | |
| Top |
| TARGET=trilium-data | |
| BKUP_DIR=/home/tbrown02/data/trilium-backup | |
| mkdir -p $BKUP_DIR/cull | |
| OUTFILE=$(date '+%Y-%m-%d-%H-%M-trilium_bkup.tar.xz') | |
| cd ~ | |
| nice tar caf $BKUP_DIR/$OUTFILE $TARGET | |
| # After https://unix.stackexchange.com/a/669081/319850 | |
| # but using sort to handle multiple bkups per day. |
| """Draw a simple SVG timeline chart with Python.""" | |
| import sys | |
| import drawsvg as draw | |
| w = 1200 | |
| h = 800 | |
| ox = -100 | |
| oy = -400 |
PROJ=factotum ; git log ^staging dev | sed -E 's/'$PROJ'-[0-9]+/\n&\n/gI' | sed -En '/'$PROJ'-[0-9]+/I p' | tr a-z A-Z | sort -u | sed 's%.*%https://jira.example.com/browse/&%'
If you're requirements.txt file is the output of pip freeze then it's really
a lock file, not a list of project dependencies. To get just the actual
dependencies:
find . -name \*.py -type f | xargs sed -En '/^(import|from)/ {s/\S+ //; s/ .*//; s/\..*//; p}' | sort -u >reqsThis extracts foo from all import foo.bar... and from foo.bar import... lines, dropping
local imports (starting with '.').