Skip to content

Instantly share code, notes, and snippets.

View Sharifur's full-sized avatar
🎯
Focusing

Sharifur Rahman Sharifur

🎯
Focusing
View GitHub Profile
@Sharifur
Sharifur / gist:7870360a6a3586b47c73b3124b5d9863
Last active March 17, 2025 09:43
auto renew cloud panel ssl certificate
Using Let's Encrypt Auto-renewal
Log in to your Cloud Panel account
Navigate to the SSL/TLS section (often under "Security" or "Domains")
Look for Let's Encrypt integration options
Enable auto-renewal for your certificates
Configure the renewal frequency (typically 30-60 days before expiration)
# Install certbot if not already installed
@Sharifur
Sharifur / .htaccess
Created November 12, 2024 05:51
prevent executing php file in a particular folder
<FilesMatch "\./(php|php5|php7|php8|phtml)$">
Deny from all
</FilesMatch>
#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]