A combination of vim and bash that I find useful
now we have redis behave like a real redis
1 file changed, +18 -2
+18-2ghost.sh
| @@ -37,7 +37,7 @@ function Gpush() { | ||
| 37 | 37 | git push -u origin main |
| 38 | 38 | cd $start |
| 39 | 39 | } |
| 40 | -function Djs() { | |
| 40 | +function djs() { | |
| 41 | 41 | local start=`pwd` |
| 42 | 42 | for i in $(seq 1 5);do |
| 43 | 43 | if test -f manage.py;then |
| @@ -46,7 +46,7 @@ function Djs() { | ||
| 46 | 46 | fi |
| 47 | 47 | done |
| 48 | 48 | } |
| 49 | -function Dj() { | |
| 49 | +function dj() { | |
| 50 | 50 | local start=`pwd` |
| 51 | 51 | for i in $(seq 1 5);do |
| 52 | 52 | if test -f manage.py;then |
| @@ -61,3 +61,19 @@ function Gupdate() { | ||
| 61 | 61 | Source |
| 62 | 62 | cd $start |
| 63 | 63 | } |
| 64 | +function djp() { | |
| 65 | + # start a django project | |
| 66 | + django-admin startproject $@ | |
| 67 | +} | |
| 68 | +function pi { | |
| 69 | + python -m pip install $@ | |
| 70 | +} | |
| 71 | +function pm { | |
| 72 | + python -m $@ | |
| 73 | +} | |
| 74 | +function redis { | |
| 75 | + docker run -p 6379:6379 --name redis -d redis:5 | |
| 76 | +} | |
| 77 | +function redis-cli { | |
| 78 | + docker exec -it redis redis-cli | |
| 79 | +} |