Skip to content

Instantly share code, notes, and snippets.

View DevJonTaylor's full-sized avatar

Jon Taylor DevJonTaylor

View GitHub Profile
@DevJonTaylor
DevJonTaylor / red-rex.md
Last active April 25, 2022 05:40
Regex Tutorial and breakdown of the Password Strength

Password Strength Regex

Regular Expression (Regex) is a really important part of coding and server management. It allows you to do many checks in a one command.
An example would be to check a file, files, directory, or your entire file system with grep. An email validator on a web form. User input meets requirements in a command line application, and so much more. I want to break down Regex in this simple tutorial using a password strength checker. Simply put if it meets all the requirements then it will pass and if not then it will fail. Simple?

Summary

I will provide explanations, definitions, and examples. All examples will be formatted for JavaScript.

@DevJonTaylor
DevJonTaylor / schema.sh
Last active April 18, 2022 03:44
Prompts for MySQL Username and Password. Then creates a .env file in the PWD. Be sure to fill out the _SQL_FILE variable and DB_NAME variable at the top.
#!/bin/bash
_ENV="./.env"
_SQL_FILE="./db/schema.sql"
DB_NAME='shebang_db'
create_env()
{
echo "Lets setup your .env"
read -p "Username: " DB_USER