Setup for testing db-sync snapshots:
- start all services
cd cardano-db-sync
docker-compose up -d
docker-compose log -f
| # Prompt timer using only Bash internals (no traps or external commands). | |
| # Displays how long the last command took if it was 5 seconds or more. | |
| __timer_stop() { | |
| if [ -z "${__timer_start_sec:-}" ]; then | |
| # If `__timer_start_sec` was already cleared, clear `__timer_show` as well, so we don't | |
| # keep showing an outdated timer. | |
| unset __timer_show | |
| return | |
| fi |
Setup for testing db-sync snapshots:
cd cardano-db-sync
docker-compose up -d
docker-compose log -f
| { | |
| "name":"cardano-node-tests", | |
| "description":"cardano-node-tests E2E tests", | |
| "ticker":"IOGQA1", | |
| "homepage":"https://github.com/input-output-hk/cardano-node-tests" | |
| } |
| #!/bin/sh | |
| missing_command=0 | |
| hash xprop 2>/dev/null || { echo "${0##*/}: please install xprop" >&2; missing_command=1; } | |
| hash wmctrl 2>/dev/null || { echo "${0##*/}: please install wmctrl" >&2; missing_command=1; } | |
| [ "$missing_command" -eq 1 ] && exit 1 | |
| case "$1" in | |
| res*) | |
| wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz |
| # from a file print 10 lines that are directly before the last ten lines without using tail or head | |
| { tac | while read l; do [ "${i:=0}" -lt 20 -a "$i" -ge 10 ] && echo "$l"; i=$(($i + 1)); done | tac; } < file | |
| # monitor changes to a file without using tail -f | |
| while : ; do read line && echo "$line" || sleep 1; done < file |
| #!/bin/sh | |
| # list of configured VPNs: | |
| # nmcli con show |grep vpn | |
| # PIA London PPTP | |
| uuid="07067b81-d1d8-46cb-8b92-59341c69fe73" | |
| # PIA NL PPTP | |
| #uuid="f8ac9237-4865-4757-a78d-8d525dc846e5" |