## When you have SUPER privileges
# enable query log
SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'TABLE';
# disable query log
SET GLOBAL general_log = 'OFF';
<?php | |
namespace App\Traits; | |
use App\Entities\User; | |
use DateTime; | |
use GuzzleHttp\Psr7\Response; | |
use Illuminate\Events\Dispatcher; | |
use Laravel\Passport\Bridge\AccessToken; | |
use Laravel\Passport\Bridge\AccessTokenRepository; |
tail -f -n 450 storage/logs/laravel*.log \ | |
| grep -i -E \ | |
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
--color |
# Get Sudo. | |
if [ $EUID != 0 ]; then | |
sudo "$0" "$@" | |
exit $? | |
fi | |
# Install Xcode first - https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 | |
# Install Xcode command line tools. | |
xcode-select --install |
## When you have SUPER privileges
# enable query log
SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'TABLE';
# disable query log
SET GLOBAL general_log = 'OFF';
curl http://169.254.169.254/latest/dynamic/instance-identity/document
Ubuntu 16, from packages:
sudo apt-get install php7.1-sodium
sudo service apache2 restart
Alternative (https://lukasmestan.com/install-libsodium-extension-in-php7/)
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
class RestartDatabase extends Command | |
{ | |
/** |
ngrok http -host-header=rewrite site.dev:80
I hereby claim:
To claim this, I am signing this object: