Skip to content

Instantly share code, notes, and snippets.

View thangly98's full-sized avatar
🏳️‍🌈

Finn thangly98

🏳️‍🌈
View GitHub Profile
@thangly98
thangly98 / nonAccentVietnamese.js
Created July 12, 2023 01:59 — forked from jarvisluong/nonAccentVietnamese.js
Converting standard Vietnamese Characters to non-accent ones (Chuyển đổi ký tự tiếng Việt sang không dấu). Example: hải -> hai
// This function converts the string to lowercase, then perform the conversion
function toLowerCaseNonAccentVietnamese(str) {
str = str.toLowerCase();
// We can also use this instead of from line 11 to line 17
// str = str.replace(/\u00E0|\u00E1|\u1EA1|\u1EA3|\u00E3|\u00E2|\u1EA7|\u1EA5|\u1EAD|\u1EA9|\u1EAB|\u0103|\u1EB1|\u1EAF|\u1EB7|\u1EB3|\u1EB5/g, "a");
// str = str.replace(/\u00E8|\u00E9|\u1EB9|\u1EBB|\u1EBD|\u00EA|\u1EC1|\u1EBF|\u1EC7|\u1EC3|\u1EC5/g, "e");
// str = str.replace(/\u00EC|\u00ED|\u1ECB|\u1EC9|\u0129/g, "i");
// str = str.replace(/\u00F2|\u00F3|\u1ECD|\u1ECF|\u00F5|\u00F4|\u1ED3|\u1ED1|\u1ED9|\u1ED5|\u1ED7|\u01A1|\u1EDD|\u1EDB|\u1EE3|\u1EDF|\u1EE1/g, "o");
// str = str.replace(/\u00F9|\u00FA|\u1EE5|\u1EE7|\u0169|\u01B0|\u1EEB|\u1EE9|\u1EF1|\u1EED|\u1EEF/g, "u");
// str = str.replace(/\u1EF3|\u00FD|\u1EF5|\u1EF7|\u1EF9/g, "y");
@thangly98
thangly98 / signature-email.html
Created June 18, 2024 01:48
Signature for Gmail use HTML
<table cellpadding="0" cellspacing="0" border="0" globalstyles="[object Object]" class="table__StyledTable-sc-1avdl6r-0 iBAlEo" style="vertical-align: -webkit-baseline-middle; font-size: small; font-family: Arial;">
<tbody>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" globalstyles="[object Object]" class="table__StyledTable-sc-1avdl6r-0 iBAlEo" style="vertical-align: -webkit-baseline-middle; font-size: small; font-family: Arial;">
<tbody>
<tr>
<td style="vertical-align: top;">
<table cellpadding="0" cellspacing="0" border="0" globalstyles="[object Object]" class="table__StyledTable-sc-1avdl6r-0 iBAlEo" style="vertical-align: -webkit-baseline-middle; font-size: small; font-family: Arial;">
<tbody>
@thangly98
thangly98 / AdministrativeUnitsOfVietnam.json
Last active June 18, 2024 06:50
Đơn vị hành chính của Việt Nam - Administrative units of Vietnam
This file has been truncated, but you can view the full file.
[
{
"Id": "01",
"Name": "Thành phố Hà Nội",
"Districts": [
{
"Id": "001",
"Name": "Quận Ba Đình",
"Wards": [
{