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 / 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 "pritdeveloper+git@gmail.com"
     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 "pritdeveloper+aws@gmail.com"
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
@pritdeveloper
pritdeveloper / mu-singh.php
Last active May 19, 2023 09:01
mu-plugin for wordpress
<?php
/**
* Plugin Name: Singh MU Plugin
* Description: This plugin is used to provide all helper functions and a special functionality to use the original domain url for attachments
*/
if( file_exists( __DIR__ . "/vendor/autoload.php" ) ) {
require_once __DIR__ . "/vendor/autoload.php";
}