Skip to content

Instantly share code, notes, and snippets.

View msoe's full-sized avatar

Minn Myat Soe msoe

View GitHub Profile

Keybase proof

I hereby claim:

  • I am msoe on github.
  • I am minn (https://keybase.io/minn) on keybase.
  • I have a public key whose fingerprint is 6DCB 5DA8 82B8 F330 DF8A D7F5 A9C1 1949 2D02 09C5

To claim this, I am signing this object:

Atom Cheatsheet

Project Key Bindings

  • cmd-shift-p: open the command palette.
  • cmd-p or cmd-t: open the fuzzy finder to find a file.
  • cmd-b: look for a file that is already open.
  • cmd-shift-b: search the list of files modified and untracked in your project repository.
  • ctrl-0: open and focus the the tree view.
# ~/.mplayer/config
# my mplayer config on Mac
really-quiet=1 # very minimal output
## postprocessing
spuaa=4 # for subtitle, gaussian blur mode
spugauss=0.5 # variance for gaussian blur above
## audio

Setting up a standalone F5 GTM from command line using tmsh

In this example, we have:

  • A datacenter "dc1"
  • "dc1" has one BIG-IP as a host "host1"
  • "host1" has one virtual server "www_vs", that host the instance of the web site
  • "global_server_pool" has "www_vs"
  • "global_server_pool" is a group of all website instances across data centers
  • "wideip" creates a name "domain.com" for "global_server_pool"
  • A DNS listener "dns1_listener", that accepts and responds DNS queries
# Run these in a superuser shell, or add sudo to the commands
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Add repository
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
@msoe
msoe / palo-alto-networks-firewall-packet-capture-tcpdump.md
Last active August 4, 2023 18:30
Packet Capturing with tcpdump on Palo Alto Networks Firewalls

> tcpdump filter "host 10.0.120.1 and not port 22"

> view-pcap mgmt-pcap mgmt.pcap

> scp export mgmt-pcap from mgmt.pcap to user@scpserver:/tmp

> tcpdump snaplen 0

@msoe
msoe / panw-userid-syslog-troubleshooting.md
Last active June 22, 2018 05:16
Palo Alto Networks Firewall User-ID Mapping With Syslog Troubleshooting

PAN-OS 8.x

> show user server-monitor state all

        UDP Syslog Listener Service is enabled
        SSL Syslog Listener Service is enabled

Proxy: Cisco ISE SecureSyslog(vsys: vsys1)      Host: Cisco ISE logs(192.168.xxx.xxx)
        number of log messages                            : 1
#!/usr/local/bin/python3
## Just a concept to display the forex rates from Central Bank, KBZ Bank, AYA Bank and CB Bank of Myanmar
## TODO: clean the code
from bs4 import BeautifulSoup
import requests,re
import datetime
response = requests.get('http://forex.cbm.gov.mm/api/latest')
@msoe
msoe / aws-cli-interface.md
Created February 15, 2019 10:46
Installing AWS Command Line Interface on macOS

AWS CLI Using pip

$ pip3 install awscli

Check the installation

$ aws --version
@msoe
msoe / verify-aws-ec2-key-pair-fingerprint.md
Created August 22, 2019 04:29
Verifying AWS EC2 Key Pair's Fingerprint

If you created your key pair using AWS, you can use the OpenSSL tools to generate a fingerprint as follows:

$ openssl pkcs8 -in path_to_private_key -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c

If you created a key pair using a third-party tool and uploaded the public key to AWS, you can use the OpenSSL tools to generate the fingerprint as follows:

$ openssl rsa -in path_to_private_key -pubout -outform DER | openssl md5 -c