Skip to content

Instantly share code, notes, and snippets.

drinking from the firehose...

Rupak Ganguly rupakg

drinking from the firehose...
View GitHub Profile
lucasponce / [1.A] Steps for GKE
Last active Mar 25, 2021
Istio Cookbook: Kiali Recipe
View [1.A] Steps for GKE
[1] Open with your gmail account
[2] Create a Project / Choose a Project you have access to.
[3] Activate "Cloud Shell"
[4] Prepare a GKE cluster using
export PROJECT_ID=`gcloud config get-value project` && \
runlevl4 / ckad-bookmarks.html
Last active Feb 1, 2021
CKAD Bookmarks (** indicates example source) [originally sourced from]
View ckad-bookmarks.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<DT><H3 ADD_DATE="1576816453" LAST_MODIFIED="1578776782">CKAD</H3>
View Restore backup db to MongoDB Docker Container
docker container id - 8c37a950839a
# 1. Copy Mongo dump to container folder
(Local System)$ docker cp dump/reaction 8c37a950839a:/var/backups/reaction
# 2. Connect to mongodb docker container
(Local System)$ docker exec -it 8c37a950839a /bin/bash
# 3. Check if backup is copied to docker container
gsans / gist:5929028e2b41a89e24ad8641638ba983
Last active Aug 31, 2019
Delete a batch of items using GraphQL
View gist:5929028e2b41a89e24ad8641638ba983
# GraphQL query
mutation batchDelete($a:ID $b:ID $c:ID $d:ID $e:ID) {
a:deleteItem(input:{ id:$a }) { id }
b:deleteItem(input:{ id:$b }) { id }
c:deleteItem(input:{ id:$c }) { id }
d:deleteItem(input:{ id:$d }) { id }
e:deleteItem(input:{ id:$e }) { id }
# Query variables
View build-serverless-template.js
#!/usr/bin/env node
/* eslint-disable no-console */
const path = require('path');
const fs = require('fs');
const templateFile = path.join(__dirname, '../../serverless.templates.yml');
const projectFile = path.join(__dirname, '../../serverless.project.yml');
const profileFile = path.join(__dirname, `../../serverless.project.${process.env.AWS_PROFILE}.yml`);
const slsFile = path.join(__dirname, '../../serverless.yml');
fjudith /
Last active Jan 14, 2021
Enable Session Affinity (a.k.a Sticky Session) to Kubernetes service


US East (Ohio) us-east-2 HTTPS ZOJJZC49E0EPZ

US East (N. Virginia) us-east-1 HTTPS Z1UJRXOUMOOFQ8

US West (N. California) us-west-1 HTTPS Z2MUQ32089INYE

US West (Oregon) us-west-2 HTTPS Z2OJLYMUO9EFXC

posener /
Last active May 4, 2021
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

asukakenji /
Last active May 7, 2021
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.14.7 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • aix
  • android
monkut / Ubuntu1604py36Dockerfile
Last active Mar 19, 2021
Base Docker image for ubuntu-16.04 & Python3.6
View Ubuntu1604py36Dockerfile
# docker build -t ubuntu1604py36
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y git