Skip to content

Instantly share code, notes, and snippets.

View omarciovsena's full-sized avatar
🤠
Focusing

Márcio Vinícius Sena omarciovsena

🤠
Focusing
View GitHub Profile
@omarciovsena
omarciovsena / replace-all.sh
Created November 15, 2018 18:44
Search and replace text in large files
sed "s/foo/bar/g" $1 > temp && rm $1 && mv temp $1
@omarciovsena
omarciovsena / strip-diacritics.js
Last active August 23, 2018 17:54
strip-diacritics
// normalize('NFD') => Normalization Form Canonical Decomposition
// replace(/[\u0300-\u036f]/g, '') => replaces all characters that are in the range of U+0300 -> U+036F
str.normalize('NFD').replace(/[\u0300-\u036f]/g, '')