Skip to content

Instantly share code, notes, and snippets.

View clintliang's full-sized avatar

Clint Liang clintliang

View GitHub Profile
@clintliang
clintliang / fork-own-repo.md
Last active April 5, 2022 09:43
How to Fork Your Own Project on Github

How to Fork Your Own Project on Github

Steps on how to create fork-repo from your own original-repo

On Github.com

  1. Create a new empty fork-repo repository on Github

On local

  1. Clone fork-repo

Configure Apache Server on MacOS Sierra

Apache is installed by default, here's how to configure it.

configure vhosts

vi /etc/apache2/httpd.conf

Add the following line

@clintliang
clintliang / bash_ps1_with_git_branch.sh
Created July 6, 2017 00:25
colorful bash path PS1 with git branch name
# path format
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\e[91m\u\e[33;40m@\H:\[\033[32m\]\w\[\033[36m\]\$(parse_git_branch)\[\033[00m\] $ "
# !/bin/bash
backup_dir=""
#String to append to the name of the backup files
backup_date=`date +%d-%m-%Y`
db=""
#Numbers of days you want to keep copie of your databases
pg_dump -b --data-only -T '"SequelizeMeta"' $db>$backup_dir/$db\_$backup_date.sql