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 | |
bq query \ | |
--nouse_legacy_sql \ | |
--format=prettyjson \ | |
'SELECT city, count(*) as g_count FROM `bigquery-public-data.fda_drug.drug_enforcement` WHERE status="Terminated" GROUP BY status, city HAVING g_count > 100 ORDER BY g_count DESC' |
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 | |
USERNAME=<username> | |
HOST=<host> | |
xfreerdp \ | |
/monitors:0,1 \ # miltiple monitors with order | |
/multimon \ # multiple monitors | |
/u:$USERNAME \ # RDP username | |
/v:$HOST # RDP host |
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 | |
PROJECT=<project> | |
ZONE=<zone> | |
INSTANCE=<compute-engine-instance> | |
DISK=<disk-name> | |
SNAPSHOT=<snapshot-name> | |
REGION=<region> | |
echo stop vm - - - - - - - - - - - - - - - - - - - - - - |
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 | |
PROJECT=<project> | |
ZONE=<zone> | |
INSTANCE=<compute-engine-instance> | |
DISK=<disk-name> | |
SNAPSHOT=<snapshot-name> | |
REGION=<region> | |
echo create disk from snapshot - - - - - - - - - - - - - - - |
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 | |
gcloud run deploy \ | |
<name> \ | |
--project=<project-name> \ | |
--region=<region> \ | |
--source . |
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
#!/bin/bash | |
# SSH connect to instance | |
gcloud compute ssh --zone <ZONE> <INSTANCE> | |
# SCP copy to instance | |
gcloud compute scp --zone <ZONE> <LOCAL-PATH> <INSTANCE>:<PATH-TO-REMOTE-DESTINATION> | |