Skip to content

Instantly share code, notes, and snippets.

💭
🐧 🗡 💻

Milan Thapa thapakazi

Block or report user

Report or block thapakazi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View egg_drop_challenge.materials.org

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 Apr 11, 2019
create_vpc work in progress
View vpc.yaml
---
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
View play_with_kubernetes-check_on_graceful_deployment.org

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'   
View likes_dislikes.org

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 Mar 12, 2019
dump http reqeust headers with a middleware
View app.go
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)
@thapakazi
thapakazi / curl.md
Created Aug 14, 2018 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

View gist:6556642b392448d9d01268ffd0f6c0b3
(defun source (filename)
"Update environment variables from a shell source file."
(interactive "fSource file: ")
(message "Sourcing environment from `%s'..." filename)
(with-temp-buffer
(shell-command (format "diff -u <(true; export) <(source %s; export)" filename) '(4))
(let ((envvar-re "declare -x \\([^=]+\\)=\\(.*\\)$"))
You can’t perform that action at this time.