| 1 | touch ~/.ghost/secret.sh |
| 2 | source ~/.ghost/secret.sh |
| 3 | git config --global core.autocrlf input |
| 4 | if uname -a | grep -q MINGW;then |
| 5 | alias python3=python |
| 6 | alias Python=python |
| 7 | else |
| 8 | alias python=python3 |
| 9 | fi |
| 10 | |
| 11 | alias Vim='vim ~/.vimrc' |
| 12 | alias Gvim='vim ~/.ghost/ghost.vimrc' |
| 13 | alias Gbash='vim ~/.ghost/ghost.sh' |
| 14 | alias clip=clip.exe |
| 15 | alias Bash='vim ~/.bashrc' |
| 16 | alias Source='source ~/.bashrc' |
| 17 | alias gcom='git add . && git commit -m' |
| 18 | alias ghook='~/.ghost/ghook/startproject.sh' |
| 19 | alias venv='python -m venv venv' |
| 20 | alias Gsecret='vim ~/.ghost/secret.sh' |
| 21 | function vsource() { |
| 22 | local start=`pwd` |
| 23 | for i in $(seq 1 5);do |
| 24 | if ! source venv/**/activate; then |
| 25 | cd .. |
| 26 | else |
| 27 | cd $start |
| 28 | break |
| 29 | fi |
| 30 | done |
| 31 | } |
| 32 | function Gpush() { |
| 33 | local start=`pwd` |
| 34 | local message=$@ |
| 35 | cd ~/.ghost |
| 36 | gcom "$message" |
| 37 | git push -u origin main |
| 38 | cd $start |
| 39 | } |
| 40 | function Djs() { |
| 41 | local start=`pwd` |
| 42 | for i in $(seq 1 5);do |
| 43 | if test -f manage.py;then |
| 44 | python manage.py runserver $1 |
| 45 | break |
| 46 | fi |
| 47 | done |
| 48 | } |
| 49 | function Dj() { |
| 50 | local start=`pwd` |
| 51 | for i in $(seq 1 5);do |
| 52 | if test -f manage.py;then |
| 53 | python manage.py $@ |
| 54 | break |
| 55 | fi |
| 56 | done |
| 57 | } |
| 58 | function Gupdate() { |
| 59 | local start=`pwd` |
| 60 | cd ~/.ghost && git pull |
| 61 | Source |
| 62 | cd $start |
| 63 | } |