Navigation Menu

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 / .sh
Created November 19, 2022 10:51
Setting Up Docker on Ubuntu 20.04 Focal (Arm64) Oracle Free
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
clear
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
lscpu
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
clear
apt-cache policy docker-ce
sudo apt-get -y install docker-ce
#!/bin/bash
if [[ "$EUID" -ne 0 ]]; then
echo "Sorry, you need to run this as root"
exit
fi
while [[ -z $action ]]; do
clear
@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
@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 / To remove the badge completely
Created May 9, 2020 02:08
To remove the badge completely
.grecaptcha-badge {
display: none;
}
@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 / 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 / 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 / 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 / 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>