Skip to content

Instantly share code, notes, and snippets.

View bajpangosh's full-sized avatar
🛰️
Working from Moon

Bajpan Gosh bajpangosh

🛰️
Working from Moon
View GitHub Profile
@bajpangosh
bajpangosh / php7
Created April 14, 2018 12:24
ex.php
apt-get -y install php7.0-fpm php7.0-curl php7.0-gd php7.0-imap php7.0-mcrypt php7.0-readline php7.0-common php7.0-recode php7.0-mysql php7.0-cli php7.0-curl php7.0-mbstring php7.0-bcmath php7.0-mysql php7.0-opcache php7.0-zip php7.0-xml php-memcached php-imagick php-memcache memcached graphviz php-pear php-xdebug php-msgpack php7.0-soap
@bajpangosh
bajpangosh / index.html
Created November 27, 2018 08:09
YouTube API - Multiple Videos on One Page
<div class="video-item">
<iframe id="video0" src="//www.youtube.com/embed/4DMGfbje7NY?enablejsapi=1&html5=1" frameborder="0" allowfullscreen></iframe>
<button class="play">Play</button>
<button class="stop">Stop</button>
</div>
<div class="video-item">
<iframe id="video1" src="//www.youtube.com/embed/nJl-qVoEEJI?enablejsapi=1&html5=1" frameborder="0" allowfullscreen></iframe>
<button class="play">Play</button>
<button class="stop">Stop</button>
@bajpangosh
bajpangosh / keybase.md
Created February 26, 2019 18:35
keybase.md

Keybase proof

I hereby claim:

  • I am bajpangosh on github.
  • I am bajpangosh (https://keybase.io/bajpangosh) on keybase.
  • I have a public key ASCQrbxcN1Zg4c_dRFqTO7wunY82OaU5e0eK8qFpzUc06Ao

To claim this, I am signing this object:

@bajpangosh
bajpangosh / Nginx Rewrites for Rank Math Sitemaps
Created March 13, 2019 05:47
Nginx Rewrites for Rank Math Sitemaps
# START Nginx Rewrites for Rank Math Sitemaps
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
# END Nginx Rewrites for Rank Math Sitemaps
@bajpangosh
bajpangosh / nginx.conf
Created April 28, 2019 16:29
Ghost Cloudflare Nginx Config
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.verifiedbyme.xyz;
# SSL
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
# reverse proxy
@bajpangosh
bajpangosh / Wordpress installation in subfolder
Last active May 8, 2020 16:26
Wordpress installation in subfolder
location /new {
try_files $uri $uri/ /new/index.php?$args /new/index.php?q=$uri&$args;
}
@bajpangosh
bajpangosh / To remove the badge completely
Created May 9, 2020 02:08
To remove the badge completely
.grecaptcha-badge {
display: none;
}
@bajpangosh
bajpangosh / gist:cdf5fc3e4274cb6f2373c2063dc9cdd2
Created December 14, 2020 14:49
MySQL/MariaDB configuration file. 2020
MySQL/MariaDB configuration file.
sudo nano /etc/mysql/mysql.conf.d/mysql.cnf
on MariaDB server, the file may live below
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
@bajpangosh
bajpangosh / port.sh
Last active November 4, 2023 09:28
port open
#!/bin/bash
# GET ALL USER INPUT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 7080 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 8080 -j ACCEPT
sudo netfilter-persistent save
#!/bin/bash
if [[ "$EUID" -ne 0 ]]; then
echo "Sorry, you need to run this as root"
exit
fi
while [[ -z $action ]]; do
clear