Skip to content

Instantly share code, notes, and snippets.

View winggundamth's full-sized avatar

Jirayut Nimsaeng (Dear) winggundamth

View GitHub Profile
@winggundamth
winggundamth / docker-compose.yml
Created February 21, 2016 22:18
Sample how to do multi-host overlay networking on swarm with docker compose
version: '2'
services:
db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=mypass
- constraint:node==node01
networks:
- backend
@winggundamth
winggundamth / gist:f836e113522a9710b54c88de985c83bc
Created January 6, 2017 14:12
Create InfluxDB database and non-admin user then grant all permission to that user
CREATE USER "username" WITH PASSWORD 'password'
CREATE DATABASE "database"
GRANT ALL ON "username" TO "database"
@winggundamth
winggundamth / setup-osa-aio.sh
Last active June 27, 2023 02:58
Install OpenStack Ansible all-in-one shell script
#!/usr/bin/env bash
set -e -x -u
# Update and install required packages
apt update
apt -y dist-upgrade
apt install -y git vim python unzip iotop htop iftop
# Clone OSA
@winggundamth
winggundamth / cloud-shell-prepare-sdt1.sh
Last active March 6, 2023 09:09
Cloud Shell Preparation Script for SDT1 Training
#!/bin/sh
# Generate SSH
[[ ! -f ~/.ssh/id_rsa ]] && ssh-keygen -f ~/.ssh/id_rsa -N ""
# Install Docker Compose v2
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
@winggundamth
winggundamth / cloud-shell-prepare-kdb23.sh
Created March 5, 2023 08:59
Cloud Shell Preparation Script for KDB23 Training
#!/bin/sh
# Generate SSH
[[ ! -f ~/.ssh/id_rsa ]] && ssh-keygen -f ~/.ssh/id_rsa -N ""
# Install Docker Compose v2
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
@winggundamth
winggundamth / cloud-shell-prepare-kad23.sh
Created February 3, 2023 16:47
Cloud Shell Preparation Script for KAD23 Training
#!/bin/sh
# Generate SSH
[[ ! -f ~/.ssh/id_rsa ]] && ssh-keygen -f ~/.ssh/id_rsa -N ""
# Install Docker Compose v2
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
@winggundamth
winggundamth / cloud-shell-prepare.sh
Last active February 3, 2023 16:07
Cloud Shell Preparation Script
#!/bin/sh
# Generate SSH
[[ ! -f ~/.ssh/id_rsa ]] && ssh-keygen -f ~/.ssh/id_rsa -N ""
# Install Docker Compose v2
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
@winggundamth
winggundamth / vault-init.sh
Created October 17, 2022 04:26
Vault Init Bash Shell to put in postStart for Vault Helm Chart to initial Vault HA Cluster on Kubernetes. This will upload root token and unseal key to MinIO or S3 compatibility storage.
#!/bin/sh
cd /home/vault
if [[ ! -f jq ]]
then
echo "Download jq command..."
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O jq
chmod +x jq
fi

Keybase proof

I hereby claim:

  • I am winggundamth on github.
  • I am winggundamth (https://keybase.io/winggundamth) on keybase.
  • I have a public key whose fingerprint is 35F5 113F 3504 E3CE D588 9D9C E817 41BB 5146 0E47

To claim this, I am signing this object:

@winggundamth
winggundamth / wp-config.php
Created September 7, 2019 08:15
Wordpress Configuration to read from environment variables
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*