List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
| //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 |
| 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: |
| 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"); |
Hopefully you'll Live Long and Prosper, so I don't mean terminal as in "you gonna die". This is a somewhat opinionated article on configuring a macOS machine with:
| # This code is under license CC0. | |
| import argparse | |
| import random | |
| import sys | |
| import time | |
| from typing import List, Tuple | |
| import datetime | |
| # Keyboard layout mapping for common typos (QWERTY layout) |