Skip to content

Instantly share code, notes, and snippets.

View vvdaal's full-sized avatar

Vince van Daal vvdaal

  • Netherlands
  • 23:17 (UTC +02:00)
View GitHub Profile
@vvdaal
vvdaal / fix_hosts_google_shell.sh
Last active May 21, 2021 07:59
Bash script for fixing the IPv6 issue with Terraform on Google Cloud Shell
#!/bin/bash
#
#Make root the owner of this file and execute in your .bashrc with sudo ./fix_hosts_google_shell.sh
#Make sure sudo uses passwordless auth
#
if grep -q "googleapis.com" /etc/hosts
then
echo "Googleapis detected in /etc/hosts, skipping bug workaround for connectivity"
exit 1
#Exists so exit script
#!/usr/bin/env bash
KEYCLOAK_URL="http://localhost:8080"
KEYCLOAK_USER="admin"
KEYCLOAK_PASSWORD="admin"
KEYCLOAK_CLIENT_ID="terraform"
# KEYCLOAK_CLIENT_SECRET="884e0f95-0f42-4a63-9b1f-94274655669e"
echo "Logging into keycloak admin"
@Stanback
Stanback / nginx.conf
Last active May 3, 2024 12:01 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs