-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_dickchang
executable file
·79 lines (64 loc) · 1.97 KB
/
.bash_dickchang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#/**
# * GIT Repository variables
# Repository Storage Location
#export GIT_REPOS_ROOT="/home/dickChang/git_repo/"
# GIT Web HTML interface directory
#export GIT_WEB_DIR="/home/dickChang/git.dickchang.com/"
# GIT Web install directory
#export GITWEB_INSTALL_DIR="/home/dickChang/gitweb/"
# * GIT Repository variables
# */
# /**
# * Add tmux path to PATH
#export PATH=$PATH:"~/local/bin"
#export LD_LIBRARY_PATH="~/local/lib"
# * Add tmux path to PATH
# */
# /**
# * virtual box: mount the shared drive
# * for VirtualBox VM
# *
#if [ -z "$(df | grep "/home/dickchang/Shared/d")" ]
# then
# echo "french" | sudo -S -p "" mount -t vboxsf D_DRIVE ~/Shared/d > /dev/null
#fi
# * virtual box: mount the shared drive
# */
# /**
# * Prompt Format
# * For Date/Time formatting see strftime. \D{format}
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /'
}
GREY='\[\033[01;30m\]'
NOCOLOR='\[\033[0m\]'
LIGHTGREY='\[\033[00;37m\]'
WHITE='\[\033[01;37m\]'
# Format:
# debian_chroot
# pwd
# git_branch [HH:MM:SS AM/PM] $
PS1="${debian_chroot:+($debian_chroot)}
${GREY}\w
\$(parse_git_branch)${NOCOLOR}[\D{%I:%M:%S %p}] $ "
# * Prompt Format
# */
# vcXsrv for x server on windows bash
export DISPLAY=localhost:0.0
# this is for using python's matplotlib plt to plot to windows
PATH=$PATH:/home/dickchang/.local/bin
export DOCKER_HOST=tcp://localhost:2375
export DISPLAY=localhost:0.0
alias dockerTensorFlow="docker run -it --rm -v /d/Work/TensorFlow/:/mnt dickchang/dockertensorflow:latest bash"
# this is for the NGINX multristream setup. Open the windows firewall for the ports.
alias dockerMultistream="docker run -it --rm -p 58052:80 -p 58053:1935 -v /d/Work/dockerShare/:/mnt/ dickchang/multistream:latest bash"
# Print cpp files to pdf
printCppToPdf()
{
if [ $# -eq 0 ]
then
echo "No arguments supplied"
else
enscript -2rG --line-numbers --highlight=cpp --margins=3:3:3:3 --color=1 -c "$1" -o - | ps2pdf - "$1.pdf"
fi
}