-
qemu —
brew install qemu -
guestfish — https://hub.docker.com/r/curator/guestfish/
1. Backup VM
qemu — brew install qemu
guestfish — https://hub.docker.com/r/curator/guestfish/
1. Backup VM
| #!/bin/sh | |
| CASKNAME="$1" | |
| CASKROOM=$(brew --caskroom) | |
| CASKDIR="$CASKROOM/$CASKNAME" | |
| DATE=$(date +"%Y%m%d%H%M%S.000") | |
| BACKUPDIR="$CASKDIR/.backup" | |
| BLACK='\033[30m' | |
| RED='\033[31m' |
Это краткая памятка, которая подходит во время вспышки любого респираторного вирусного заболевания. Я ее пишу не для того, чтобы вы срочно начинали все это делать - никакого повода нет. Но, если вы хотите снизить вероятность получения или распространения вирусов - прочитайте.
| #!/bin/bash | |
| # | |
| # terraform-app | |
| # | |
| # This to terraform the servers for the Galleon App | |
| # By storing the date now, we can calculate the duration of provisioning at the | |
| # end of this script. | |
| start_seconds="$(date +%s)" |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |