Skip to content

Instantly share code, notes, and snippets.

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

Pritpal Singh pritdeveloper

🏠
Working from home
View GitHub Profile
@pritdeveloper
pritdeveloper / change-domain.sh
Created September 7, 2024 20:26 — forked from jagveerdev/change-domain.sh
Update domain on an existing wordpress db
#!/bin/bash
# Prompt for MySQL credentials
read -p "Enter MySQL username: " MYSQL_USER
read -sp "Enter MySQL password: " MYSQL_PASS
echo
read -p "Enter MySQL database name: " DB_NAME
read -p "Enter old domain (e.g., old.example.com): " OLD_DOMAIN
read -p "Enter new domain (e.g., new.example.com): " NEW_DOMAIN
@pritdeveloper
pritdeveloper / docker_wordpress.md
Created October 9, 2019 00:09 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@pritdeveloper
pritdeveloper / wc_order_status_changes.php
Created August 3, 2018 14:56 — forked from abegit/wc_order_status_changes.php
WooCommerce Hooks for Order Status Changes
function mysite_pending($order_id) {
error_log("$order_id set to PENDING", 0);
}
function mysite_failed($order_id) {
error_log("$order_id set to FAILED", 0);
}
function mysite_hold($order_id) {
error_log("$order_id set to ON HOLD", 0);
}
function mysite_processing($order_id) {
# common
alias ls='ls --color=auto -F'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias less="less -R "
alias ..="cd ../"