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
# https://mariadb.com/kb/en/library/upgrading-from-mariadb-103-to-mariadb-104/ | |
# Add MariaDB APT repo | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 | |
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.4/ubuntu bionic main' | |
sudo apt-get update | |
# Stop MariaDB | |
sudo systemctl stop mysql |
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
// For use with dyrynda/laravel-efficient-uuid && dyrynda/laravel-model-uuid | |
// Can be used for other Laravel conversions as well... | |
// Assumes you rename the uuid CHAR(36) column to uuid_save and add a uuid BINARY(16) column before running this via artisan tinker | |
// Replace App\Model with the appropriate model | |
$items = App\Model::all(); | |
foreach ($items as $item) { | |
if (empty($item->uuid_save)) { | |
echo 'uuid_save is empty'.PHP_EOL; |
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
git stash | |
git fetch --all | |
git reset --hard origin/[branch_name] |
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
// set the disk('local') to the desired disk to check | |
Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix(); |
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
/* Update the old MD5 hash to the new bcrypt -- rough outline */ | |
if (strlen($member['password']) === 32) { | |
if ($member['password'] == md5( $_POST['password'] )){ | |
$password = password_hash( $_POST['password'], PASSWORD_BCRYPT ); | |
$DB->query("UPDATE members SET password='{$password}' WHERE id='{$member['id']}';"); | |
$auth_success = true; | |
} | |
} else { | |
/* Not 32 characters? Then it is a bcrypt password */ | |
if (password_verify($_POST['password'], $member['password'])) { |