Skip to content

Instantly share code, notes, and snippets.

View georgercarder's full-sized avatar
👽

George Carder georgercarder

👽
View GitHub Profile
@georgercarder
georgercarder / regexp.js
Created December 18, 2020 19:11
simple validation of regexp logic
const regExp = new RegExp('__([A-Z][A-Za-z0-9]*)_{2,}', 'g');
const regExpNoGlobal = new RegExp('__([A-Z][A-Za-z0-9]*)_{2,}');
let bytecode = 'hello__CAT_hi__CAT____ahem_oKey__CAT_raccon__CAT__doggy';
let match = regExp.exec(bytecode);
console.log("regExp with Global");
#!/bin/bash
# since this is a bash script, be sure to make this
# executable using "sudo chmod 777"
dir=$1
if [ -n "$dir" ]; then
echo "Directory path must be first arg."
echo " example: ./hashAllFiles.sh myFavoriteDirectory"