Skip to content

Instantly share code, notes, and snippets.

View josephphyo's full-sized avatar
🏠
Working from home

Phyo Min Htun (Joseph) josephphyo

🏠
Working from home
View GitHub Profile
@josephphyo
josephphyo / AWS RIs Types
Last active August 4, 2019 17:17
AWS RIs Types
Standard Amazon Reserved Instances
> Switching between Regional and an Availability Zone scope (more on that below).
> Switch between Availability Zones to a specific zone within the same region (for AZ scoped RIs only).
> Switching between Classic EC2 Reserved Instances and Virtual Private Cloud.
> Altering the instance size within the same family (For example, splitting an m4.xlarge Reservation into 2 m4.large Reservations, or the reverse: merging 2 m4.large Reservations into 1 m4.xlarge reservation.)
Convertible RIs
> Exchange for a new Instance type (across families)
@josephphyo
josephphyo / Disaster Recovery Scenarios Options
Last active April 7, 2020 06:20
Key factors for Disaster Planning
Backup & Restore (Data backed up and restored)
Pilot Light (Only Minimal critical functionalities)
Warm Standby (Fully Functional Scaled down version)
Multi-Site (Active-Active)
@josephphyo
josephphyo / AWSCLI-Ec2
Last active February 15, 2020 10:26
AWS Cli Usage - Sample
<< Key Pair >>
Create a Key Pair
$ aws ec2 create-key-pair --key-name MyKeyPair --query 'KeyMaterial' --output text > MyKeyPair.pem
$ chmod 400 MyKeyPair.pem
Display Key Pair
$ aws ec2 describe-key-pairs --key-name MyKeyPair
Delete Key Pair
$ aws ec2 delete-key-pair --key-name MyKeyPair
@josephphyo
josephphyo / Managing User Accounts on Linux Instance
Created November 30, 2019 15:45
Managing User Accounts on Linux Instance - https://amzn.to/34AAx6x
1.Creating a User Account
#useradd user1
2.Add the SSH public key to the user account. First create a directory in the user's home directory for the SSH key file, then create the key file, and finally paste the public key into the key file.
#cd /home/user1
#mkdir .ssh
#cd .ssh
#vim authorized_keys (Paste user public key in this file)
3.Setup permission
@josephphyo
josephphyo / create-kube-user.sh
Created March 1, 2020 17:46 — forked from henning/create-kube-user.sh
create k8s user, certificate, permissions and client config
#!/bin/bash
CLUSTERNAME=mycluster.mydomain
NAMESPACE=default
USERNAME=myclusteruser
GROUPNAME=mygroup
openssl genrsa -out ${USERNAME}.key 2048
CSR_FILE=$USERNAME.csr
@josephphyo
josephphyo / Cost Optimization Pillar
Last active April 12, 2020 09:14
The 5 Pillars of the AWS Well-Architected Framework
1. Cost Effective Resource selection
2. Match Supply and demand
3. Awareness of spend
4. Optimize
<< Cost Effective Resource Selection >>
Provision to current needs with an eye to future.
Right Sizing.
Use data to choose purchase option. (on-demand or spot)
Optimize by Regions, AZ and Edge (global infrastructure)
@josephphyo
josephphyo / .bashrc
Created April 22, 2020 12:15 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@josephphyo
josephphyo / README.md
Created December 22, 2020 17:51 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


### Keybase proof
I hereby claim:
* I am josephphyo on github.
* I am josephphyo (https://keybase.io/josephphyo) on keybase.
* I have a public key ASCijTZVv2XC2thG4D96eFe9c7-YzJkdsbd76JOl1peSogo
To claim this, I am signing this object:
@josephphyo
josephphyo / calculator-class.py
Last active May 2, 2021 05:38
Python Function Return Test
class calculator:
number1 = 0
number2 = 0
def __init__(self,num1 = int(input("Please Enter First Number --> ")),num2 = int(input("Please Enter Second Number2 -> "))):
self.number1 = num1
self.number2 = num2
def add(self):
result = self.number1 + self.number2
return result
def minus(self):