Skip to content

Instantly share code, notes, and snippets.

View Sharifur's full-sized avatar
🎯
Focusing

Sharifur Rahman Sharifur

🎯
Focusing
View GitHub Profile
#show list of firewall allow ports
sudo firewall-cmd --allow-ports
# allow new ports in firewall
sudo firewall-cmd --permanent --add-port=2082/tcp
#then reload firewall
sudo firewall-cmd --reload
npx eslint . --ext .js,.jsx,.ts,.tsx
npx eslint . --ext .js,.jsx,.ts,.tsx --fix
circular dependency issue finder
npx madge --circular --extensions ts,tsx .
@Sharifur
Sharifur / how to install posges sql 16
Created June 5, 2024 10:49
How to Install PostgreSQL 16 on AlmaLinux
https://www.liquidweb.com/kb/install-postgresql-almalinux/
Install PostgreSQL on AlmaLinux
If you have never installed PostgreSQL on Linux before, or this is your first time using AlmaLinux, don’t worry. Just follow our easy five-step guide to get PostgreSQL running in no time.
Step #1: Update AlmaLinux
Before you install PostgreSQL on Linux, you should first make sure that your distribution has the latest packages installed. To do this, you need to use the dnf command, which will automatically update any outdated packages.
dnf update -y
@Sharifur
Sharifur / linux-command-to-get-disk-user-by-folder
Created June 4, 2024 15:17
How to Find Most Used Disk Space Directories and Files in Linux
du -s * | sort -nr | head -n10
@Sharifur
Sharifur / horizon.ini
Last active May 25, 2024 06:20
configure supervisor in alma linux
[program:horizon]
process_name=%(program_name)s
command=php /home/path_to_the_script/artisan horizon
autostart=true
autorestart=true
user=root
redirect_stderr=true
stdout_logfile=/home/path_to_the_script/horizon.log
stopwaitsecs=3600
@Sharifur
Sharifur / mail.php
Created October 24, 2023 15:07
smtp mail showing send success but not getting the mail, issue in hostgator solved by this code.
//config/mail.php
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
@Sharifur
Sharifur / .htaccess
Created October 24, 2023 14:04
home page not working without index.php
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
@Sharifur
Sharifur / .htaccess
Created October 11, 2023 14:15
How to remove public from laravel project using htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
#add this file in the root folder
@Sharifur
Sharifur / queue-work-in-shared-hosting.php
Created July 31, 2023 17:00
how to run laravel queue:work command without memory leak in shared hosting
//add this code in app/console/kernel.php file insider schedule method
$schedule->command('queue:work --timeout=60 --tries=1 --once')
->everyMinute()
->withoutOverlapping()
->sendOutputTo(storage_path() . '/logs/queue-jobs.log');