Skip to content

Instantly share code, notes, and snippets.

View ngocdangrby's full-sized avatar
💁‍♂️
Hello

Nguyễn Ngọc Đăng ngocdangrby

💁‍♂️
Hello
View GitHub Profile
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
#!/usr/bin/env python3
"""Print emails from a given date interval.
Usage:
$ %(prog)s <since_date> <before_date>
since_date < before_date
Date format: DD-Mon-YYYY e.g., 3-Mar-2014
@JoachimL
JoachimL / barcodereader.py
Last active November 8, 2022 07:33
Python USB barcode reader
import evdev
from evdev import *
from azure.storage.queue import QueueService, QueueMessageFormat
import threading
import time
from queue import *
import datetime
# responsible for uploading the barcodes to the azure storage queue.
class BarcodeUploader:
@hu2di
hu2di / ConvertVie.js
Last active March 1, 2025 13:15
JavaScript: Chuyển tiếng Việt có dấu sang không dấu
function removeVietnameseTones(str) {
str = str.replace(/à|á|||ã|â||||||ă|||||/g,"a");
str = str.replace(/è|é||||ê||ế|||/g,"e");
str = str.replace(/ì|í|||ĩ/g,"i");
str = str.replace(/ò|ó|||õ|ô||||||ơ|||||/g,"o");
str = str.replace(/ù|ú|||ũ|ư|||||/g,"u");
str = str.replace(/|ý|||/g,"y");
str = str.replace(/đ/g,"d");
str = str.replace(/À|Á|||Ã|Â||||||Ă|||||/g, "A");
str = str.replace(/È|É||||Ê|||||/g, "E");
@GLMeece
GLMeece / Steps_to_Terminal_Enlightenment_on_a_Mac.md
Last active March 6, 2025 10:16
Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit)