commit | author | age
|
4ec261
|
1 |
gradleWrapper () { |
MH |
2 |
if [ ! -f gradlew ]; then |
|
3 |
echo "No 'gradlew' found. Maybe you are not in the root dir of a gradle project?" |
766382
|
4 |
return 1 |
4ec261
|
5 |
fi |
MH |
6 |
|
|
7 |
TEMPFILE=$(mktemp /tmp/gw.XXXXXX) |
87e2b0
|
8 |
unbuffer ./gradlew "$@" | tee $TEMPFILE |
4ec261
|
9 |
|
MH |
10 |
echo |
87e2b0
|
11 |
grep --color=never "Report:" $TEMPFILE |
4ec261
|
12 |
rm $TEMPFILE |
MH |
13 |
} |
|
14 |
|
766382
|
15 |
postgresAutodoc () { |
MH |
16 |
if ! [ -x "$(command -v postgresql_autodoc)" ]; then |
|
17 |
echo "Program 'postgresql_autodoc' not found. Please install, e.g. via: sudo apt install postgresql-autodoc" >&2 |
|
18 |
echo "See also https://github.com/cbbrowne/autodoc" >&2 |
|
19 |
return 1 |
|
20 |
fi |
|
21 |
|
|
22 |
if ! [ -x "$(command -v dot)" ]; then |
|
23 |
echo "Program 'graphviz dot' not found. Please install, e.g. via: sudo apt install graphviz" >&2 |
|
24 |
echo "See also https://graphviz.org" >&2 |
|
25 |
return 1 |
|
26 |
fi |
|
27 |
postgresql_autodoc -d postgres -f build/postgres-autodoc -h localhost -u postgres --password=password \ |
|
28 |
-m '(rbacobject|hs).*' \ |
|
29 |
-l /usr/share/postgresql-autodoc -t neato && |
|
30 |
dot -Tsvg build/postgres-autodoc.neato >build/postgres-autodoc-hs.svg && \ |
|
31 |
echo "generated: $PWD/build/postgres-autodoc-hs.svg" |
|
32 |
|
|
33 |
postgresql_autodoc -d postgres -f build/postgres-autodoc -h localhost -u postgres --password=password \ |
|
34 |
-m '(global|rbac).*' \ |
|
35 |
-l /usr/share/postgresql-autodoc -t neato && |
|
36 |
dot -Tsvg build/postgres-autodoc.neato >build/postgres-autodoc-rbac.svg && \ |
|
37 |
echo "generated $PWD/build/postgres-autodoc-rbac.svg" |
|
38 |
} |
|
39 |
|
|
40 |
alias postgres-autodoc=postgresAutodoc |
|
41 |
|
430f75
|
42 |
alias podman-start='systemctl --user enable --now podman.socket && systemctl --user status podman.socket && ls -la /run/user/$UID/podman/podman.sock' |
d63e3f
|
43 |
alias podman-stop='systemctl --user disable --now podman.socket && systemctl --user status podman.socket && ls -la /run/user/$UID/podman/podman.sock' |
430f75
|
44 |
alias podman-use='export DOCKER_HOST="unix:///run/user/$UID/podman/podman.sock"; export TESTCONTAINERS_RYUK_DISABLED=true' |
4ec261
|
45 |
|
MH |
46 |
alias gw=gradleWrapper |
306f8d
|
47 |
alias pg-sql-run='docker run --name hsadmin-ng-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:13.7-bullseye' |
MH |
48 |
alias pg-sql-stop='docker stop hsadmin-ng-postgres' |
|
49 |
alias pg-sql-start='docker container start hsadmin-ng-postgres' |
|
50 |
alias pg-sql-remove='docker rm hsadmin-ng-postgres' |
|
51 |
alias pg-sql-reset='pg-sql-stop; pg-sql-remove; pg-sql-run' |
|
52 |
alias pg-sql-backup='docker exec -i hsadmin-ng-postgres /usr/bin/pg_dump --clean --create -U postgres postgres | gzip -9' |
|
53 |
alias pg-sql-restore='gunzip --stdout | docker exec -i hsadmin-ng-postgres psql -U postgres -d postgres' |
|
54 |
|
c31956
|
55 |
alias fp='grep -r '@Accepts' src | sed -e 's/^.*@/@/g' | sort -u | wc -l' |