Skip to content

Instantly share code, notes, and snippets.

🐧 🗡️ 💻

Milan Thapa thapakazi

🐧 🗡️ 💻
View GitHub Profile
thapakazi /
Created Jun 12, 2019 — forked from StephenSorriaux/
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux


pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
thapakazi /
Created Aug 14, 2018 — forked from subfuzion/
curl POST examples

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)
(shell-command (format "diff -u <(true; export) <(source %s; export)" filename) '(4))
(let ((envvar-re "declare -x \\([^=]+\\)=\\(.*\\)$"))
thapakazi / ecdsa_example.rb
Created May 19, 2018 — forked from ostinelli/ecdsa_example.rb
ECDSA usage from Ruby.
View ecdsa_example.rb
require 'openssl'
require 'base64'
# ===== \/ sign =====
# generate keys
key ="secp256k1")
public_key = key.public_key
public_key_hex = public_key.to_bn.to_s(16).downcase # public key in hex format
thapakazi / ecc.rb
Created May 19, 2018 — forked from bkerley/ecc.rb
ruby ECDSA fun time
View ecc.rb
# derived from
require 'openssl'
require 'base64'
include OpenSSL
group_name = 'secp521r1'
message = '10000 fartbux sent to bryce from a can of beans'
key =
key = key.generate_key
thapakazi /
Created Apr 5, 2018 — forked from bigglesrocks/
Rails Scoped Invitation System

#Scoped Invitation System for User Groups with Rails#

Starting out with the following models and associations:


  • has_many :memberships
  • has_many :organizations through :memberships

####Organization (User Group)

  • has_many :memberships
thapakazi /
Created Mar 13, 2018
List of AWS availability zones for each AWS region
AWS region code AWS region name Number of AZs AZ names
us-east-1 Virginia 4 us-east-1a, us-east-1b, us-east-1c, us-east-1e
us-west-1 N. California 2 us-west-1a, us-west-1b
us-west-2 Oregon 3 us-west-2a, us-west-2b, us-west-2c
eu-west-1 Ireland 3 eu-west-1a, eu-west-1b, eu-west-1c
eu-central-1 Frankfurt 2 eu-central-1a, eu-central-1b
ap-southeast-1 Singapore 2 ap-southeast-1a, ap-southeast-1b
ap-southeast-2 Sydney 2 ap-southeast-2a, ap-southeast-2b, ap-southeast-2c
ap-northeast-1 Tokyo 2 ap-northeast-1a, ap-nort
You can’t perform that action at this time.