An image sprite is a collection of images put into a single image or file.
Helps reduce the number of HTTP requests, memory and bandwidth usage.
They are often used to significantly improve performance in emoji selectors.
| git checkout --orphan latest_branch | |
| git add -A | |
| git commit -am "commit" | |
| git branch -D main | |
| git branch -m main | |
| git push -f origin main |
| @echo off | |
| setlocal enabledelayedexpansion | |
| for /d %%d in (%SystemDrive%\Users\*) do ( | |
| set "file=%%d\AppData\Local\IconCache.db" | |
| set "files=%%d\AppData\Local\Microsoft\Windows\Explorer\iconcache*" | |
| del /f /q "!file!" | |
| del /f /q /s "!files!" | |
| ) |
| ;@Ahk2Exe-ConsoleApp | |
| /************************************************************************ | |
| * Enumerate and invoke commands from the shellex context menu. | |
| * | |
| * 1) Install AutoHotkey v2. | |
| * https://www.autohotkey.com/download/ahk-v2.exe | |
| * | |
| * 2) Compile this script: Right click โ Show more options โ Compile script. | |
| * 3) Run 'shellex.exe' from the command prompt (cmd.exe) to see the help. |
Synchrony implies that the execution of multiple tasks occurs sequentially one after the other. Tasks are like steps that are executed in order, each operation blocks the others until completion.
Task #1 โโโโโโโโโโโโโค............................
Task #2 .............โโโโโโโโโโโโโโค..............
| const $REF = Symbol(); | |
| const $DEL = Symbol(); | |
| /** | |
| * Set a cleanup callback for the specified object. | |
| * @param {object} target | |
| * The target value to register. | |
| * @param {Function} callback | |
| * Function called when the target is garbage-collected. | |
| * @returns {Function} |
A character is an overloaded term that can mean many things. This gist will briefly touch on the differences between Code Point, Code Unit, Grapheme and Glyph, with a particular focus on emojis.
Tip
Use [Full Emoji Support For All Websites][emoji] to ensure correct rendering of all emoji graphemes on any website.
| /** | |
| * Language-sensitive relative time formatting. | |
| * @see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat | |
| * @example | |
| * // now | |
| * console.log(formatRelativeTime( | |
| * '2000/01/01 00:00:00', | |
| * '2000/01/01 00:00:00' | |
| * )); | |
| * |
| const str = encode('โ<Hello.World/>โ'); | |
| console.log('encoded:', `_${str}_ (${str.length})`); | |
| console.log('decoded:', decode(str)); | |
| function encode(str, off='โ', on='โ', sep='โ') { | |
| return [...(new TextEncoder()).encode(str)].map(byte => ( | |
| byte.toString(2).split('').map(bit => (bit === '0' ? off : on)) | |
| ).join('')).join(sep); | |
| } |