Skip to content

Instantly share code, notes, and snippets.

View thapakazi's full-sized avatar
💭
🐧 🗡️ 💻

Milan Thapa thapakazi

💭
🐧 🗡️ 💻
View GitHub Profile
@thapakazi
thapakazi / install-kubernetes-archlinux.md
Created June 12, 2019 09:34 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@thapakazi
thapakazi / _aws_golang_examples.md
Created April 21, 2019 07:44 — forked from eferro/_aws_golang_examples.md
golang aws: examples

AWS Golang SDK examples

@thapakazi
thapakazi / egg_drop_challenge.materials.org
Created April 12, 2019 03:24
don't let your eggs crack ;)

Eggs, save them for dinner :P

Supplies

  • 1 egg
  • a newspaper sheet
  • 6-10 straws
  • a plastic bag
  • a string
  • a duct tape
@thapakazi
thapakazi / vpc.yaml
Created April 11, 2019 12:10
create_vpc work in progress
---
Description: >-
An AWS VPC with model according to https://medium.com/aws-activate-startup-blog/practical-vpc-design-8412e1a18dcc
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsSupport: true

flood on the server with 100s or request with vegeta

echo "GET http://10.110.132.62:2048/hostname"| vegeta attack -rate=100/s  -duration=1m |tee results.bin |  vegeta encode

watch changes on all pods

watch -d -n 0.01 'kubectl get po  -o wide'   
@thapakazi
thapakazi / likes_dislikes.org
Last active March 17, 2019 14:40
duming the brain

What I like and dislike

like

  • childrens playing the game of life
  • hands planting trees, cleaning rivers
  • minds that stick to a business with motivations greater than self, wealth
  • who put other first to themselves
  • all the helpers, blessing, prayers, love, hopes
@thapakazi
thapakazi / app.go
Last active March 12, 2019 16:51
dump http reqeust headers with a middleware
import (
"net/http/httputil"
)
//dump http reqeust headers
func App() *buffalo.App {
if app == nil {
...
//somewhere inside your
if ENV == "development" {
app.Use(middleware.ParameterLogger)