Skip to content

Instantly share code, notes, and snippets.

View myohanhtet's full-sized avatar
🎖️
Focusing

Ko Phyo myohanhtet

🎖️
Focusing
View GitHub Profile
@myohanhtet
myohanhtet / .htaccess
Created January 30, 2023 08:01 — forked from nasrulhazim/.htaccess
Laravel .htaccess with Security & Optimisation
# Directory Listing
Options -Indexes
<IfModule mod_security.c>
# Server Information Disclosure
ServerTokens Prod
ServerSignature Off
SecServerSignature " "
</IfModule>

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@myohanhtet
myohanhtet / CSVHelper.java
Created June 22, 2020 08:25
CSV to Java Object
package com.myohanhtet.dirctonary.helper;
import com.myohanhtet.dirctonary.model.Dictionary;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.springframework.web.multipart.MultipartFile;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@myohanhtet
myohanhtet / converter.php
Created May 24, 2019 07:13
Converter Myanmar number <=> English number
<?php
class MmConverter
{
/**
* Convert Myanmar <=> English string.
*
* @param string $digits
* @return string
*/
@myohanhtet
myohanhtet / download.py
Created May 24, 2019 07:05
Youtube Download with pytube ~
from pytube import YouTube
yturl = [
//Array youtube URL
]
for dl in yturl:
yt = YouTube(dl)