Skip to content

Instantly share code, notes, and snippets.

View Emuentes's full-sized avatar
🎉
Enjoying Life

Edgar Muentes Emuentes

🎉
Enjoying Life
View GitHub Profile
@Emuentes
Emuentes / index.js
Created October 16, 2019 18:58
Run all files in repl.it root folder
// This will automatically import all the files in your repl's root folder that have a file name beginning with "autoAdd"
var files = fs.readdirSync('./');
for(file of files) {
if(file.startsWith("autoAdd")) {
require("./" + file);
}
}
@Emuentes
Emuentes / Convert_mov_to_gif_using_ffmpeg.sh
Last active June 24, 2020 17:45
Bash Function to convert an MOV file into an animated gif (great for adding a small animated clip of new functionality to a Pull Request)
function convertMovToGif
{
pathToSourceFile=$1
pathToSourceFileDirectory=$(dirname "${pathToSourceFile}")
fileName=$(basename "${pathToSourceFile}")
filenameWithoutExtension="${fileName%.*}"
nameToSaveFileAs="$2"
generatedFilePath="$pathToSourceFileDirectory/${nameToSaveFileAs:-$filenameWithoutExtension-generated}.gif"
echo "*************************************"
echo "-----VIDEO TO GIF - INPUT DATA-------"