Skip to content

Instantly share code, notes, and snippets.

View trinhvanminh's full-sized avatar
🎲
haha

Minh trinhvanminh

🎲
haha
  • Ho Chi Minh City, Viet Nam
View GitHub Profile
@trinhvanminh
trinhvanminh / stringToColor.js
Created August 22, 2022 17:39
string to color | use for generating color for "TextAvatar" from username: string
function stringToColor(string) {
let hash = 0;
let i;
for (i = 0; i < string.length; i += 1) {
hash = string.charCodeAt(i) + ((hash << 5) - hash);
}
let color = '#';
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 21:31
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 6, 2024 12:29
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE