Skip to content

Instantly share code, notes, and snippets.

View rbrto's full-sized avatar

Roberto Esparza rbrto

View GitHub Profile
@rbrto
rbrto / GCPArchitect-KarloTips.md
Created April 24, 2020 02:17 — forked from anarquias/GCPArchitect-KarloTips.md
Google Cloud Professional Architect - Tips
@rbrto
rbrto / google_bigquery_backup_views_scheduled_queries_git.py
Created January 6, 2023 18:09 — forked from krisjan-oldekamp/google_bigquery_backup_views_scheduled_queries_git.py
Backup BigQuery Views and Scheduled Queries to a Git repository using Python. Full article on stacktonic.com
############################################################
# Author Krisjan Oldekamp / Stacktonic.com
# Email krisjan@stacktonic.com
# Article https://stacktonic.com/article/backup-your-valuable-big-query-views-and-scheduled-queries-using-python
############################################################
import os
import git
import google.oauth2.service_account
from google.cloud import bigquery
@rbrto
rbrto / elasticsearch.service
Created February 24, 2017 18:00
ElasticSearch Systemd file
#Developer : Anshul Patel
#Put the file in /etc/systemd/system
#Make sure that the elasticsearch and run directory have permission of appropriate user
#In order to start it during boot, sudo systemctl enable elasticsearch
[Unit]
Description=ElasticSearch Service
After=network.target
[Service]
@rbrto
rbrto / how-to.md
Created September 13, 2021 12:48 — forked from radeksimko/how-to.md
VPC endpoint Terraform example setup

How to

ssh ec2-user@IP
aws configure set region us-west-2
aws s3 ls # listing s3 buckets over VPC endpoint privately
@rbrto
rbrto / postgres_manager.py
Created May 24, 2021 17:50 — forked from valferon/postgres_manager.py
Python script to take care of postgres backup and restore of data
#!/usr/bin/python3
import argparse
import logging
import subprocess
import os
import tempfile
from tempfile import mkstemp
import configparser
import gzip
@rbrto
rbrto / docker-compose.yaml
Created April 10, 2021 01:00 — forked from darth-veitcher/docker-compose.yaml
Traefik v2.0 with Cloudflare Wildcard and OpenVPN
version: "3"
services:
traefik:
image: "traefik:v2.0"
container_name: "traefik"
command:
# Globals
- "--log.level=DEBUG"
- "--api=true"
@rbrto
rbrto / install-gcloud-on-centos.sh
Created June 13, 2018 16:39
Install Google Cloud SDK on CentOS
# https://cloud.google.com/sdk/downloads#yum
sudo tee /etc/yum.repos.d/google-cloud-sdk.repo > /dev/null <<EOM
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
@rbrto
rbrto / main.tf
Created August 18, 2020 00:27
Dead letter topic module
data "google_project" "project" {}
resource "google_pubsub_topic" "topic" {
name = var.topic
project = var.project_id
}
resource "google_pubsub_topic" "dead_letter_topic" {
name = var.dead_letter_topic
project = var.project_id