-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot.bash_profile-Darwin
153 lines (111 loc) · 3.58 KB
/
dot.bash_profile-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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#
# Only for MacOSx
#
decho "$HOME/.bash_profile-Darwin"
# Vagrant
#export VAGRANT_DEFAULT_PROVIDER=kvm
# llvm
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# sublime
export PATH="$PATH:/Applications/Sublime Text.app/Contents/SharedSupport/bin"
# sublime merge
export PATH="$PATH:/Applications/Sublime Merge.app/Contents/SharedSupport/bin"
# Pip3
export PATH="$PATH:$HOME/Library/Python/3.7/bin/"
# gnupg
export PATH="$(brew --prefix gpg)/bin:$PATH"
# pdflatex
export PATH="/usr/local/texlive/2019basic/bin/x86_64-darwin:$PATH"
# android tools
export PATH="~/Devel/Devices/Celular/platform-tools:$PATH"
# python 3.7
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
# binutils
export PATH="/usr/local/Cellar/binutils/2.34/bin:$PATH"
# php
export PATH="/usr/local/Cellar/[email protected]/7.2.28/bin:$PATH"
# couchbase server
export PATH="/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin:$PATH"
# mysql-client
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
# ruby
export PATH="$HOME/.gem/bin:$(brew --prefix [email protected])/bin:$PATH"
# make4
export PATH="$(brew --prefix make)/bin:$PATH"
# util-linux (renice,col,cal,rename,renice,flock)
export PATH="$(brew --prefix util-linux)/bin:$PATH"
# brew bin
#export PATH="$PATH:/usr/local/bin"
export PATH="/opt/homebrew/bin:$PATH"
# fix openssl.cnf complain messages
export OPENSSL_CONF=/dev/null
# use touchid for ssh key
export SSH_AUTH_SOCK=$HOME/.sekey/ssh-agent.ssh
# Java
export JAVA_HOME="/Library/Java/JavaVirtualMachines/java"
# If you'd like to mimic the colors of a typical Linux terminal:
export LSCOLORS="ExGxBxDxCxEgEdxbxgxcxd"
export CLICOLOR=1
# FreeRADIUS
#export DYLD_LIBRARY_PATH=./build/lib/.libs/
export ASAN_SYMBOLIZER_PATH="$(which llvm-symbolizer)"
export ASAN_OPTIONS="symbolize=1 detect_leaks=1 detect_stack_use_after_return=1"
export LSAN_OPTIONS="fast_unwind_on_malloc=0:malloc_context_size=50"
# Commands
export _DD=gdd
export _LS=gls
# gcc settings
export CC=$(brew --prefix llvm@14)/bin/clang
export PERL=$(brew --prefix perl)/bin/perl
export CPAN=$(dirname $PERL)/cpan
# Darwin functions/aliases
alias show-cpu-info="sysctl -n machdep.cpu.brand_string"
alias ldd="otool -L"
alias ls="ls -G"
# Android
export ANDROID_AVD_HOME="$HOME/.android/avd"
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
export PATH="${ANDROID_SDK_ROOT}/tools:${ANDROID_SDK_ROOT}/tools/bin:${ANDROID_SDK_ROOT}/platform-tools:$PATH"
alias emulator="${ANDROID_SDK_ROOT}/tools/emulator"
# eapol
export EAPOL_PROG=/Users/jpereira/bin/eapol_test.ok
# openssl
export PATH="/opt/homebrew/opt/openssl/bin:$PATH"
# cpu
export NCPU="$(sysctl -n hw.logicalcpu)"
#if type brew 2&>/dev/null; then
source "$(brew --prefix)/etc/bash_completion"
#else
# echo "run: brew install git bash-completion"
#fi
function reset-osx-acls() {
sudo chmod -R -N $@
sudo xattr -rc $@
}
function pyenv-hack-list() {
pyenv versions
}
function pyenv-hack-init() {
pyenv local $1
eval "$(pyenv init -)"
}
function pyenv-hack-install() {
for _v in $@; do
echo "## Installing $_v"
CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 pyenv install -v $_v
done
}
function set-cc-xcode-clang() {
export CC=$(xcodebuild -find clang)
echo CC=\"$CC\"
}
function set-cc-brew-llvm() {
local _v="$1"
[ -n "$_v" ] && _v="-${_v}"
export CC="/opt/homebrew/opt/llvm/bin/clang${_v}"
echo CC=\"$CC\"
}
function cleanup-brew() {
brew cleanup --prune=all
}