Skip to content

Instantly share code, notes, and snippets.

View mage1k99's full-sized avatar
🏠
Working from home

Magesh Babu mage1k99

🏠
Working from home
View GitHub Profile
@mage1k99
mage1k99 / how_to_install.md
Last active May 2, 2024 05:33
How to install WordPress with caddy2

How to Install WordPress in Caddy 2

PHP Version : 8.0 Wordpress version : 5.7.2 Caddy version : v2.4.3


Note!

This one is outdated: please check the offical guide here

@mage1k99
mage1k99 / debloat_ubuntu.sh
Created June 20, 2021 17:27
Debloat script for Mi
#!/bin/bash
sudo snap remove snap-store -y
sudo snap remove gtk-common-themes -y
sudo snap remove gnome-3-34-1804 -y
sudo snap remove core18 -y
sudo apt purge snapd -y
echo "Snap and Snapd are removed!"
sudo apt-mark hold snap snapd
echo "Snap/Snapd are now blocked from Ubuntu!"
sudo apt purge yelp -y
@mage1k99
mage1k99 / db_py.py
Last active June 19, 2021 11:01
db_python
#The PyMongo distribution contains tools for interacting with MongoDB database from Python
import pymongo
import urllib.parse
#def adduser(update, context):
# db(update)
def db(data):
user = "username"
pwd = urllib.parse.quote("password")
DATABASE_NAME = '' #Your Database Name here.
@mage1k99
mage1k99 / set value of GPG_TTY in fishShell
Created December 28, 2020 21:37
Command to set the value of GPG_TTY value in fish
set -gx GPG_TTY (tty)
@mage1k99
mage1k99 / Telling about GPG Keys to Git
Created December 28, 2020 21:34
The list of commands that says git to use the GPG Key
git config --global user.signingkey ED267DF4249ACCC3
git config --global gpg.program (which gpg)
git config --global commit.gpgsign true
@mage1k99
mage1k99 / Listing GPG Keys
Created December 28, 2020 21:30
Command to List the GPG Keys
gpg --list-secret-keys --keyid-format LONG
@mage1k99
mage1k99 / Generate GPG Key
Last active December 28, 2020 21:28
generate gpg key, for my medium article
gpg --full-gen-key
#!/bin/bash
siteDir="/var/www/$1"
echo 'Creating directory at /var/www/ for '$1''
mkdir -p $siteDir
echo 'Directory created '$siteDir' '
echo "changing ownership of directory"
chown www-data:www-data $siteDir -Rv
echo "creating an index.html file"
@mage1k99
mage1k99 / regex
Created June 30, 2020 09:50
Collections of Regex, that i found useful, as I find , I'll update this Gist.
Find unwanted empty lines, can be used with find and replace to remove unwanted empty lines
^(?:[\t ]*(?:\r?\n|\r))+
@mage1k99
mage1k99 / .bashrc
Created April 24, 2020 10:03
PopOS! bashrc with parrot style terminal
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# Xx_69pussy_slayer420_xX
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac