Skip to content

Instantly share code, notes, and snippets.

View edwinvelez's full-sized avatar
🏠
127.0.0.1

Edwin Velez edwinvelez

🏠
127.0.0.1
View GitHub Profile
@edwinvelez
edwinvelez / create-database.sh
Created December 26, 2020 12:47
Create database and grant user access via bash script.
#! /bin/bash
newUser=''
newDbPassword=''
newDb=''
host=localhost
#host='%'
commands="CREATE DATABASE \`${newDb}\`;CREATE USER '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT ALL privileges ON \`${newDb}\`.*
TO '${newUser}'@'${host}';FLUSH PRIVILEGES;"
@edwinvelez
edwinvelez / functions.php
Last active May 20, 2019 19:40
Compare Two Domain Name Values
<?php
/**
* Compare Two Domain Name Values
*
* @author Edwin Velez (https://edwinvelez.net)
* @link https://edwinvelez.net/compare-two-domain-name-values/
*/
// The domain name or host you want to compare. Can also be a host i.e. http://localhost