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
# --all-databases , -A | |
# 导出全部数据库 | |
mysqldump -uroot -p --all-databases | |
# --all-tablespaces , -Y | |
# 导出全部表空间。 | |
mysqldump -uroot -p --all-databases --all-tablespaces | |
# --no-tablespaces , -y | |
# 不导出任何表空间信息。 |
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
status=$(service php7.4-fpm status | grep running) | |
if [ -z "$status" ] | |
then | |
service php7.4-fpm start | |
else | |
echo "FPM is running" | |
fi |
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
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Symfony\Component\Process\Process; | |
use Symfony\Component\Process\Exception\ProcessFailedException; | |
class BackUpDatabase extends Command | |
{ |
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
.input { | |
@apply bg-white rounded-lg w-full max-w-lg px-6 border border-gray-300 py-3 mt-2; | |
&::placeholder { | |
@apply text-gray-dark; | |
} | |
&:focus { | |
@apply border-opacity-0 outline-none shadow-outline-blue; | |
} |
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
composer update --ignore-platform-reqs |
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 shutdown machine | |
shutdown --poweroff | |
# Remaining Disk Status, Human Readable | |
df -h | |
# Directory Usage, Human Readable | |
du -hs * |
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
<?php namespace App\Services; | |
/** | |
* A PHP version of the Enigma machine. | |
* Wikipedia: http://en.wikipedia.org/wiki/Enigma_machine | |
* | |
* This might not be an accurate representation. I have never seen, nor used an enigma machine. | |
* This class was created by reading the article at http://enigma.louisedade.co.uk/howitworks.html. | |
* | |
* Usage: |
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
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ImageOptimize extends Command { | |
/** | |
* The console command name. |