Skip to content

Instantly share code, notes, and snippets.

View sandangel's full-sized avatar
🎯
Improving my workflow

San Nguyen sandangel

🎯
Improving my workflow
View GitHub Profile
@sandangel
sandangel / bash.generate.random.alphanumeric.string.sh
Created February 27, 2025 08:43 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@sandangel
sandangel / data-channel.config.ts
Created May 11, 2018 07:43 — forked from steveblue/data-channel.config.ts
WebRTC DataChannel Angular Service
let uuid = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
let r = Math.random() * 16 | 0, v = c === 'x' ? r : ( r & 0x3 | 0x8 );
return v.toString(16);
});
};
let defaultRoom = function() {
let text = '';