Skip to content

Instantly share code, notes, and snippets.

View winggundamth's full-sized avatar

Jirayut Nimsaeng (Dear) winggundamth

View GitHub Profile
@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 / 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 / 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 / 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:
*
@winggundamth
winggundamth / docker-compose.yml
Created April 28, 2018 09:01
Elasticsearch Cluster + Grafana Docker Compose File
version: '3'
services:
es1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: es1
environment:
cluster.name: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TAKE_FILE_OWNERSHIP: "true"
@winggundamth
winggundamth / gist:72a795d1aad9a1cceafb9f52f6a8e28e
Created August 25, 2017 11:48
How to git clone with another ssh-key
GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_2' git pull
export GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_2'
@winggundamth
winggundamth / daemon.json
Created August 12, 2017 12:20
My Docker daemon.json
{
"live-restore": true,
"storage-driver": "overlay2",
"registry-mirrors": ["https://registry-mirror.example.com"]
}