Skip to content

Instantly share code, notes, and snippets.

View kgrvamsi's full-sized avatar
🎯
Focusing

Vamsi Kotipalli kgrvamsi

🎯
Focusing
  • Amazon (AWS)
  • Austin,TX
View GitHub Profile
@kgrvamsi
kgrvamsi / docker_cleanup.md
Created March 4, 2020 21:52 — forked from fredeerock/docker_cleanup.md
clean up docker

Stop all containers:

  • docker ps -aq | xargs docker stop

Remove all containers:

  • docker ps -aq | xargs docker rm

Remove all images:

  • docker images -aq | xargs docker rmi

Remove all networks:

@kgrvamsi
kgrvamsi / install.sh
Created January 2, 2020 15:40 — forked from v1k0d3n/install.sh
Install kubeadm in self-hosted mode
# System preparation
## Update system:
sudo apt-get update && sudo apt-get dist-upgrade -y
## Prepare for Docker-CE install:
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
@kgrvamsi
kgrvamsi / kubeadm-fed-01.md
Created December 20, 2019 22:07
Kubernetes Federation Tweak to install the Kube-Federation Control Plane using Kubeadm
kubectl get pods -n kube-system
NAME                                    READY   STATUS    RESTARTS   AGE
coredns-5c98db65d4-2xhgz                1/1     Running   0          10m
coredns-5c98db65d4-66frr                1/1     Running   0          10m
etcd-ubuntu-xenial                      1/1     Running   0          9m49s
kube-apiserver-ubuntu-xenial            1/1     Running   0          10m
kube-controller-manager-ubuntu-xenial   1/1     Running   0          9m48s
kube-flannel-ds-amd64-4lm5j             1/1     Running   0          7m47s
kube-proxy-vd54k                        1/1     Running   0          10m
@kgrvamsi
kgrvamsi / psql-with-gzip-cheatsheet.sh
Created August 13, 2019 15:21 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database

'Users hate change'

This week NN Group released a video by Jakob Nielson in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@kgrvamsi
kgrvamsi / vault_demo.sh
Created July 22, 2019 20:37 — forked from greenbrian/vault_demo.sh
Quick Vault demo usage
#!/bin/bash
## The following command starts Vault in development mode
## specifiying a root token value of 'root'
##
# VAULT_UI=true vault server -dev -dev-root-token-id="root"
## Login with root token
## Good for demo mode, should only be used on production cluster
## during initial configuration
@kgrvamsi
kgrvamsi / letsencrypt_2019.md
Created July 15, 2019 04:26 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@kgrvamsi
kgrvamsi / auth.js
Created June 14, 2019 03:51 — forked from divyanshu013/auth.js
Authentication service for TodoMVC authorization app
import auth0 from 'auth0-js';
import history from './history';
export default class Auth {
requestedScopes = 'openid profile email read:todos write:todos';
// Please use your own credentials here
auth0 = new auth0.WebAuth({
domain: 'divyanshu.auth0.com',
clientID: 'IcVGTI2AUvc49lnE0ltVemretrsI3y3P',
@kgrvamsi
kgrvamsi / tar.go
Created April 30, 2019 14:51 — forked from jonmorehouse/tar.go
Quick golang script for creating a gzipped tarball
package main
import (
"os"
"archive/tar"
"log"
"io"
"compress/gzip"
)