Skip to content

Instantly share code, notes, and snippets.

View suryakencana007's full-sized avatar
🛴
Never End Learning

Nanang Suryadi suryakencana007

🛴
Never End Learning
View GitHub Profile
@suryakencana007
suryakencana007 / platform-managerial-resources.md
Last active March 7, 2022 16:32
Management And Technical Platform Stuff

Platform Stuff

Jobs Detail

What You Will do

We are seeking an experienced, talented Platform Engineer to join the engineering team at Shipper in Indonesia or remotely anywhere around the world. You'll be bringing your skills and expertise to design, build and scale our highly available and distributed SaaS platform and its numerous applications that make our business possible and essential to many.

You will be working in an Agile and test-driven environment, given the autonomy to decide the best way to design, ship and support the system. You will use the best tools for the job and follow industry best practices to ship a product that is truly valuable to our users and partners.
@suryakencana007
suryakencana007 / consul-vault.md
Created February 1, 2022 14:50
kubernetes vault ha with consul

Secret

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" -o go-template="{{.data.password | base64decode}}"

Unseal vault key

init and store unseal key and root token

@suryakencana007
suryakencana007 / kubernetes-dashboard.md
Created January 10, 2022 05:30
Kubernetes Dashboard

Install Kubernetes Dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml

Patch the dashboard to allow skipping login

kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'

Install Metrics Server

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.2/components.yaml

Patch the metrisc server to work with insecure TLS

@suryakencana007
suryakencana007 / aes-256-cbc-test.js
Created January 3, 2021 16:16 — forked from brettscott/aes-256-cbc-test.js
AES 256 CBC encryption between Golang and Node JS
// Node v6.9.0
//
// TEST FILE (cut down for simplicity)
// To ensure Golang encrypted string can be decrypted in NodeJS.
//
let crypto;
try {
crypto = require('crypto');
#!/bin/bash
docker-machine create --driver generic --generic-ip-address=<ip-vps> --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user=ubuntu node-neo-01
@suryakencana007
suryakencana007 / README.md
Created July 18, 2020 19:57 — forked from mattupstate/README.md
An example of how to setup streaming replication for PostgreSQL with Docker.

PostgreSQL Streaming Replication With Docker

The *.txt files here hold user and database parameters. Specifically, replication.txt contains the user/role and password to use for replication. Whereas database.txt contains an initial database, user/role and password to create on the master.

Run the master:

$ fig run -d master

Wait for it to start up completely. Start the slave:

CLI

$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
$ sudo apt update
$ sudo apt install docker-ce
$ sudo usermod -aG docker ${USER}
@suryakencana007
suryakencana007 / docker-run
Last active April 28, 2019 05:54
Getting Started Kong Docker
--- Kong with postgres container
--- Step 1 Migration Database
docker run --rm \
--network=kong-net \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=postgresql-local" \
-e "KONG_PG_DATABASE=kong-database" \
-e "KONG_PG_USER=root" \
-e "KONG_PG_PASSWORD=root" \
kong:latest kong migrations bootstrap
@suryakencana007
suryakencana007 / monthly-date.sql
Last active April 27, 2019 22:48
Get Date Series Monthly
SELECT
DATE(date) AS date_order,
EXTRACT(MONTH FROM DATE(date)) AS month_of
FROM
GENERATE_SERIES(DATE_TRUNC('year', CURRENT_TIMESTAMP + INTERVAL '7 hour'),
DATE_TRUNC('month', CURRENT_TIMESTAMP + INTERVAL '7 hour'),
INTERVAL '1 month') AS date
Results: [