Skip to content

Instantly share code, notes, and snippets.

View coo11's full-sized avatar

coo11

  • Future Gadget Laboratory
  • China
View GitHub Profile
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 15, 2025 23:50
Conventional Commits Cheatsheet
@ufocoder
ufocoder / JavaScript.Magic.js
Last active July 20, 2025 04:54
JavaScript Magic
/*******************************************
*
* Javascript Magic Page
*
* Author: Sergey Ivanov <[email protected]>
*
* (\_/)
* (=':'=)
* ▀▀▀███████▀▀▀
* ███████
@joni
joni / toUTF8Array.js
Last active May 14, 2024 09:23
toUTF8Array: Javascript function for encoding a string in UTF8.
function toUTF8Array(str) {
var utf8 = [];
for (var i=0; i < str.length; i++) {
var charcode = str.charCodeAt(i);
if (charcode < 0x80) utf8.push(charcode);
else if (charcode < 0x800) {
utf8.push(0xc0 | (charcode >> 6),
0x80 | (charcode & 0x3f));
}
else if (charcode < 0xd800 || charcode >= 0xe000) {