This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sys env | |
export PATH="/usr/local/sbin:/Users/{user_name}/.composer/vendor/bin:$PATH" | |
export PATH="/Users/{user_name}/.go/bin:$PATH" | |
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" | |
# app env | |
export PGDATA=/usr/local/postgres | |
export GOROOT=/usr/local/Cellar/go/1.10.2/libexec | |
export GOPATH=$HOME/.go | |
export NODE_PATH="/usr/local/lib/node_modules" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "No arguments supplied." | |
exit | |
fi | |
if [ -n "$2" ]; then # if second argument exists | |
if [ -e "$2" ]; then # if second argument is a valid path | |
if [ -d "$2" ]; then # if second argument is a directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grep initial password for version 5.7 and above | |
grep 'temporary password' /var/log/mysqld.log | |
# reinitialize database (create database directories and system databases) | |
mysqld --initialize --console | |
# set new password (no hash function or password function called) | |
set password = 'new password'; | |
# do as it says |