Skip to content

Instantly share code, notes, and snippets.

oofnikj

Block or report user

Report or block oofnikj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oofnikj
oofnikj / get_cloud.sh
Last active Oct 14, 2019
Download and install latest google-cloud-sdk on Alpine / Debian / Ubuntu
View get_cloud.sh
#!/bin/sh -e
######
# Tested with various flavors of Alpine, Ubuntu and Debian. CentOS / RedHat not supported (yet).
# Use:
# wget -qO- https://gist.githubusercontent.com/oofnikj/7a2fb1e6b20b397775d882ecd8980159/raw | sh
######
SDK_DIR=/usr/local/lib
which apt && apt update && apt install -y wget jq python3 ca-certificates --no-install-recommends || true
@oofnikj
oofnikj / pg_manage.sh
Last active Oct 14, 2019
PostgreSQL dump / restore to Google Cloud Storage
View pg_manage.sh
#!/bin/bash
PGUSER=${PGUSER:-"postgres"}
CATALOG_BUCKET="normalized-catalog"
_get_dbs() {
psql -U $PGUSER -c "COPY (
SELECT datname FROM pg_database
WHERE datname NOT IN (
'postgres',
You can’t perform that action at this time.