Skip to content

Instantly share code, notes, and snippets.

View ssoemoe's full-sized avatar
🖐️
Hello there

Shane Khant Soe Moe ssoemoe

🖐️
Hello there
View GitHub Profile
@ssoemoe
ssoemoe / Yangon Postal Codes.txt
Created August 13, 2021 06:21
Yangon Postal Codes
Ahlone – 11121
Aung San – Insein – 11012
Bahan – Bahan – 11201
Bayintnaung Market (Thamine) – Mayangone – 11062
Bogyoke Market – Pabedan – 11143
Botahtaung – Botahtaung – 11162
Botahtaung – Botahtaung – 11161
Dagon – Dagon – 11191
Dagon Myothit (North) – Dagon Myothit (North) – 11421
Dagon Myothit (South) – Dagon Myothit (South) – 11431
@ssoemoe
ssoemoe / restart-usb-driver.sh
Created December 16, 2020 03:44
Restart usb driver module in Linux
sudo modprobe usbhid
@ssoemoe
ssoemoe / dotnetcore_app.conf
Created June 17, 2020 03:43
Reverse proxy Apache HTTPD configuration in /etc/httpd/conf.d
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ErrorLog /var/log/httpd/<app_name>-error.log
CustomLog /var/log/httpd/<app_name>-access.log common
</VirtualHost>
@ssoemoe
ssoemoe / angular-generate-routings.MD
Last active April 7, 2020 22:05
Angular CLI generates component + module + routing

According to this command,
ng generate module <module path to be created> --module=<parent module path where its component to be declared> --route=<route_url>
example:
ng g m components/login --module=app.module --route=login

It also creates component files under components folder.
--module is the module where its component want to be declared (Its component was not added to the app.module.ts though)
--route is the route it wants to be added in app-routing.module.ts

Only module

@ssoemoe
ssoemoe / ssh-add.sh
Created January 22, 2020 21:44
Re-adding SSH key for remote git repos
ssh-add ~/.ssh/<INSERT_private_ssh_key>
@ssoemoe
ssoemoe / socket-cheatsheet.js
Last active January 8, 2020 15:24 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to the client
socket.emit('hello', 'can you hear me?', 1, 2, 'abc');
// sending to all clients except sender
socket.broadcast.emit('broadcast', 'hello friends!');
// sending to all clients in 'game' room except sender
socket.to('game').emit('nice game', "let's play a game");
// sending to all clients in 'game1' and/or in 'game2' room, except sender
@ssoemoe
ssoemoe / UnzipMemoryStream.cs
Last active August 1, 2019 17:36
C# getting the target file bytes which is inside the zip file
using System;
using System.Linq;
using System.IO;
using System.IO.Compression;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using Ionic.Utils.Zip;
// Add references before using them
@ssoemoe
ssoemoe / dynamic_link.html
Created May 24, 2019 22:15
Dynamic download preparation
@ssoemoe
ssoemoe / nav-tab.html
Last active May 23, 2019 16:38
Bootstrap Switchable Nav Tabs
<!--CREDIT to https://www.tutorialrepublic.com/codelab.php?topic=bootstrap&file=create-dynamic-tabs-via-javascript-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Creating Dynamic Tabs in Bootstrap 4 via JavaScript</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
@ssoemoe
ssoemoe / gist:9641fee43ee14347446428fd34f76d20
Last active March 25, 2019 17:53
Display text over image on hover
<!--Credit goes to W3Schools, I modified a little bit to fit into my model -->
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.overlay-container {
position: relative;
width: 50%;
}