Skip to content

Instantly share code, notes, and snippets.

View darknight1604's full-sized avatar

Huỳnh Quốc Tấn darknight1604

View GitHub Profile
@bluzky
bluzky / github_export.exs
Last active March 30, 2022 08:56
Export your github pull request with Elixir
Mix.install([
{:tesla, "~> 1.4.3"},
{:csv, "~> 2.4"},
{:jason, "~> 1.3"}
])
defmodule GithubPR do
require Logger
def exec(repo, token) do
@tungvn
tungvn / regex-vietnamese-phone-number-updated-2018.js
Last active January 16, 2024 07:45
Vietnamese phone number Regex validation
/*
Before Septemper 15 2018, Vietnam has phone number start with 09*, 01(2|6|8|9).
After that, the phone number can start with 03, 05, 07 or 08.
So this function provide a way to validate the input number is a Vietnamese phone number
*/
function isVietnamesePhoneNumber(number) {
return /(03|05|07|08|09|01[2|6|8|9])+([0-9]{8})\b/.test(number);
}