-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc.Darwin
93 lines (84 loc) · 3.26 KB
/
bashrc.Darwin
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
PATH=/usr/local/bin:$PATH
PATH=/usr/local/opt/kubernetes-cli/bin:$PATH
PATH=/usr/local/opt/openssl/bin:$PATH
PATH="/usr/local/opt/node@10/bin:$PATH"
GOBIN="$HOME/go/bin"
GOPRIVATE="codebox.galileosuite.com"
PATH="$GOBIN:$PATH"
export PATH
eval "$(/opt/homebrew/bin/brew shellenv)"
BREW_PREFIX="$(brew --prefix)"
# GIT: prompt and completions
if [ -f ${BREW_PREFIX}/etc/bash_completion ]; then
. ${BREW_PREFIX}/etc/bash_completion
. $HOME/.minikube-completion
fi
if [ -f ${BREW_PREFIX}/etc/bash_completion.d/git-prompt.sh ]; then
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWDIRTYSTATE=1
#GIT_PS1_SHOWSTASHSTATE=1
#GIT_PS1_SHOWUNTRACKEDFILES=1
#GIT_PS1_SHOWUPSTREAM="auto"
fi
#if [ -f "${BREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh" ]; then
#
# # Set config variables first
# GIT_PROMPT_ONLY_IN_REPO=1
#
# # GIT_PROMPT_FETCH_REMOTE_STATUS=0 # uncomment to avoid fetching remote status
# # GIT_PROMPT_IGNORE_SUBMODULES=1 # uncomment to avoid searching for changed files in submodules
#
# # GIT_PROMPT_SHOW_UPSTREAM=1 # uncomment to show upstream tracking branch
# # GIT_PROMPT_SHOW_UNTRACKED_FILES=all # can be no, normal or all; determines counting of untracked files
#
# # GIT_PROMPT_SHOW_CHANGED_FILES_COUNT=0 # uncomment to avoid printing the number of changed files
#
# # GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh # uncomment to support Git older than 1.7.10
#
# # GIT_PROMPT_START=... # uncomment for custom prompt start sequence
# # GIT_PROMPT_END=... # uncomment for custom prompt end sequence
#
# # as last entry source the gitprompt script
# # GIT_PROMPT_THEME=Custom # use custom theme specified in file GIT_PROMPT_THEME_FILE (default ~/.git-prompt-colors.sh)
# # GIT_PROMPT_THEME_FILE=~/.git-prompt-colors.sh
# # GIT_PROMPT_THEME=Solarized # use theme optimized for solarized color scheme
#
# __GIT_PROMPT_DIR="${BREW_PREFIX}/opt/bash-git-prompt/share"
# source "${BREW_PREFIX}/opt/bash-git-prompt/share/gitprompt.sh"
#fi
# User specific aliases and functions
alias ls='ls -G'
alias gpe="cd ~/src/codebox/galileo/gpe-server"
#alias s="git sourcetree"
alias e="etcdctl -C http://192.168.100.131:2379"
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
convert_dvd() {
_in="$1"
_out=$(basename "${_in}" | sed -e 's/\..*$/.iso/g')
hdiutil makehybrid -iso -joliet -o "${_out}" "${_in}" && printf "Converted ${_in} ==> ${_out}\n"
}
remove_png() {
o="$(basename "$1")"
printf "Converting '$1' ==> '$o'\n\n"
(
printf "ffmpeg -i \"$1\" "
for i in $(ffmpeg -i "$1" 2>&1 | grep Stream | grep -v "Audio: ac3" | grep -v "Video: png" | cut -d# -f2 | cut -d\( -f 1); do
printf "%s" "-map $i "
done
printf "%s\n" "-c copy \"$o\""
) | sh
}
grab() {
_customer=$1
_no_files=$2
_dest_dir=$3
_pattern=${4:-*.gpe.gz}
if [ -z "${_dest_dir}" ]; then
echo "Must provide [customer] [num_files] [dest_dir] [pattern=*.gpe.gz]"
else
printf "\n\nCopying ${_pattern} files into ${_dest_dir}...\n\n"
mkdir -p ${_dest_dir} && \
scp dev:{$(ssh dev "echo \$(find /share/dev01/archive/${_customer} -name '*.$(date '+%Y%m%d').${_pattern}' -printf \"%T@ %p\n\" |sort -rn|head -${_no_files} | awk '{print \$NF}')" 2> /dev/null |sed -e 's/ /,/g')} ${_dest_dir}
fi
}