Skip to content

Instantly share code, notes, and snippets.

View tgedikli's full-sized avatar

Tuğrul Gedikli tgedikli

  • Kapital Online
  • Türkiye, İstanbul
View GitHub Profile
@tgedikli
tgedikli / mysqldump-snippet
Created December 14, 2022 19:24 — forked from yuechuanx/mysqldump-snippet
The command about mysqldump | mysqldump 导出数据相关的命令
# --all-databases , -A
# 导出全部数据库
mysqldump -uroot -p --all-databases
# --all-tablespaces , -Y
# 导出全部表空间。
mysqldump -uroot -p --all-databases --all-tablespaces
# --no-tablespaces , -y
# 不导出任何表空间信息。
@tgedikli
tgedikli / FPMChecker.sh
Last active August 6, 2022 13:13
A Bash Script that checks PHP FPM is running, if not start FPM Service
status=$(service php7.4-fpm status | grep running)
if [ -z "$status" ]
then
service php7.4-fpm start
else
echo "FPM is running"
fi
@tgedikli
tgedikli / BackUpDatabase.php
Created June 22, 2021 10:30 — forked from hungthai1401/BackUpDatabase.php
Laravel command backup, restore postgresql database
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
class BackUpDatabase extends Command
{
.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;
}
@tgedikli
tgedikli / Laravel Horizon Windows Composer
Created June 4, 2020 12:45
On Windows Laravel Horizon got an error requires ext-pcntl. Install application with ignoring Horizon
composer update --ignore-platform-reqs
# For shutdown machine
shutdown --poweroff
# Remaining Disk Status, Human Readable
df -h
# Directory Usage, Human Readable
du -hs *
@tgedikli
tgedikli / Enigma.php
Created June 8, 2016 15:47
PHP Enigma Machine
<?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:
<?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.