Skip to content

Instantly share code, notes, and snippets.

View thiegomoura's full-sized avatar

Thiego Moura thiegomoura

View GitHub Profile
@thiegomoura
thiegomoura / copy_txt_files.sh
Created June 28, 2023 18:44
A shell script to copy txt files
if [ $# -ne 2 ]; then
echo "Invalid parameters! Use: $0 <origem> <destination>"
exit 1
fi
origen="$1"
destination="$2"
# check if origen directory exits
if [ ! -d "$origen" ]; then
@thiegomoura
thiegomoura / vowelCount.js
Last active June 28, 2023 18:45
Vowel count with async function
const vowels = ["a", "e", "i", "o", "u"]
function vowelCount(text, callback) {
const letters = text.split('')
const vowelCount = letters.reduce((acc, value) => {
const isVowel = vowels.includes(value.toLowerCase())
if (isVowel) acc++
@thiegomoura
thiegomoura / mdiorac-br.md
Last active October 1, 2021 23:31
Prototype specification