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 / linux-host.conf
Last active February 28, 2021 02:57
Linux host file
<VirtualHost *:80>
ServerName local
DocumentRoot /var/www/vhosts/
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/vhosts>
Options Indexes FollowSymLinks
@pritdeveloper
pritdeveloper / after-install-linux.md
Last active December 13, 2020 04:21
after install linux

sudo without password

sudo visudo

{USER} ALL=(ALL) NOPASSWD: ALL

install vim

sudo apt install vim -y
@pritdeveloper
pritdeveloper / aliases.sh
Last active November 21, 2023 16:44
aliases for linux
# 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 ../"
@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 / ce host.conf
Last active October 8, 2019 22:38
Codeenvy Host file
<VirtualHost *:80>
DocumentRoot /projects/project
LogLevel info
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /projects>
Options Indexes FollowSymLinks
# 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 ../"
@pritdeveloper
pritdeveloper / startup steps for codeenvy.md
Last active October 9, 2019 00:14
Startup Steps for codeenvy

Startup steps for Codeenvy

Git Config and global .gitignore file

  • Setup the git configuration variables
     git config --global user.name "Pritpal Singh"
     git config --global user.email "[email protected]"
     git config --global core.excludesfile "~/.gitignore"
     git config --global color.ui true
     git config --global push.default current
@pritdeveloper
pritdeveloper / startup.sh
Last active August 22, 2019 07:24
Startup Script for AWS Cloud9
# git
git config --global user.name "Pritpal Singh"
git config --global user.email "[email protected]"
git config --global core.editor vi
git config --global core.whitespace off
git config --global core.excludesfile "~/.gitignore"
git config --global advice.statusuoption false
git config --global color.ui true
git config --global push.default current
@pritdeveloper
pritdeveloper / .gitignore
Created May 29, 2019 17:10
curl {RAW_URL} > ~
.hgignore
node_modules
.c9
.DS_Store
Thumbs.db
# C/C++
*.slo
*.lo
*.o