-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile_arm
119 lines (60 loc) · 4.91 KB
/
.bash_profile_arm
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
export PS1='\[\e[1;38;5;$((RANDOM%256))m\]bash \V\[\e[m\]\[\e[0;38;5;$((RANDOM%256))m\] | \[\e[m\]\[\e[1;38;5;$((RANDOM%256))m\]$PWD\[\e[m\]\[\e[0;38;5;$((RANDOM%256))m\] | \[\e[m\]\[\e[1;38;5;$((RANDOM%256))m\]$(ls -Al1 | wc -l | sed "s/ //g")\[\e[m\]\n\[\e[1;38;5;$((RANDOM%256))m\]|->\[\e[m\] '
# \s = shell name, \V = version and patchlevel of shell, $PWD = print working directory, $(ls -Al1 | wc -l | sed "s/ //g") = shows number of files in current working directory (omitting . and .. from the count), \n = new line.
# \[\e[x;38;5;COLORm\] where x = 0 for normal, x = 1 for bold, x = 2 for faint, x = 3 for italic, x = 4 for underline, x = 5 for blink, x = 7 for reverse.
# 38;5; for the foreground and 48;5; for the background.
# \[\e[m\] resets to default.
# COLOR = number between [0,255] - see https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg
# $((x+RANDOM%(y-x+1))) generates a random integer between [x,y].
eval "$(/opt/homebrew/bin/brew shellenv)"
export EDITOR='/usr/bin/open -e -W'
export HOMEBREW_CASK_OPTS="--no-quarantine"
export HOMEBREW_DEVELOPER=1
export HOMEBREW_DISPLAY_INSTALL_TIMES=1
export HOMEBREW_FORCE_BREWED_CA_CERTIFICATES=1
export HOMEBREW_FORCE_BREWED_CURL=1
export HOMEBREW_FORCE_BREWED_GIT=1
export HOMEBREW_FORCE_VENDOR_RUBY=1
export HOMEBREW_GITHUB_API_TOKEN=$(cat ~/.homebrew_github_api_token)
export [email protected]
export HOMEBREW_GIT_NAME=miccal
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSTALL_FROM_API=1
export HOMEBREW_UPGRADE_GREEDY=1
export PATH="/opt/homebrew/opt/curl/bin:$PATH"
artsync() { rsync -a -v --delete ~/Library/Containers/com.apple.AMPArtworkAgent/Data/Documents/artwork ~/Library/CloudStorage/Dropbox/pictures; }
bing() { for i in $(cat ~/Library/CloudStorage/Dropbox/Code/shortcuts/bing/mktlist.txt); do curl --silent "http://www.bing.com/HPImageArchive.aspx?format=js&uhd=1&idx=0&n=1&mkt=$i" | grep --only-matching "\"url\":\"\/.*\.jpg" | sed 's/"url":"\/th?id=OHR\.//g' | sed 's/\.jpg.*//g'; done; }
binggrep() { for i in $(cat ~/Library/CloudStorage/Dropbox/Code/shortcuts/bing/mktlist.txt); do curl --silent "http://www.bing.com/HPImageArchive.aspx?format=js&uhd=1&idx=0&n=1&mkt=$i" | grep --only-matching "\"url\":\"\/.*\.jpg" | sed 's/"url":"\/th?id=OHR\.//g' | sed 's/\.jpg.*//g' | grep -v ROW; done; }
cdbrew() { cd "$(brew --repository)"; }
cdcasks() { cd "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask; }
cdcore() { cd "$(brew --repository)"/Library/Taps/homebrew/homebrew-core; }
cddropbox() { cd ~/Library/CloudStorage/Dropbox; }
cdmiccal() { cd "$(brew --repository)"/Library/Taps/miccal/homebrew-miccal; }
chromeincognito() { open -a /Applications/Google\ Chrome.app --args --incognito; }
cltupdate() { sudo rm -r -f /Library/Developer/CommandLineTools; sudo xcode-select --install; }
curlfollow() { curl -sLI "$1" | grep -i Location; }
dockheight() { defaults write com.apple.dock tilesize -integer 40; killall Dock; }
dropclean() { cd ~/Library/CloudStorage/Dropbox; sudo find . -iname "*conflicted*" -delete; sudo find . -iname ".DS_Store" -delete; cd; }
dropcleanlist() { cd ~/Library/CloudStorage/Dropbox; sudo find . -iname "*conflicted*"; sudo find . -iname ".DS_Store"; cd; }
dropsync() { rsync -a -v --delete ~/Library/CloudStorage/Dropbox ~/documents; }
gpgreload() { gpgconf --kill all; gpgconf --launch all; }
jupyterclean () { find . -type d -iname ".ipynb_checkpoints" | sed -e 's/^/"/g' -e 's/$/"/g' | tr '\n' ' ' | sed 's/$/\n/g'; }
jupyterload () { cd ~/Library/CloudStorage/Dropbox; jupyter lab --no-browser; }
jupyterstart () { open -a /Applications/Google\ Chrome.app --args --incognito --app="$1"; }
keychain() { open /System/Library/CoreServices/Applications/Keychain\ Access.app; }
launchpadreset () { defaults write com.apple.dock ResetLaunchPad -boolean true; killall Dock; }
manpdf() { man -t "$1" | ps2pdf - - | open -f -a Preview; }
masterpassword() { open -a /Applications/Google\ Chrome.app --args --incognito --app=https://js.masterpassword.app; }
mp3count() { find . -name "*.mp3" | wc -l; }
onesync() { rsync -a -v --delete ~/Library/CloudStorage/OneDrive-UWA ~/Library/CloudStorage/Dropbox; }
pdf4() { pdfjam --nup 2x2 --landscape --frame true --suffix "(4 pages per sheet)" "$1"; }
pipoutdated() { python3 -m pip list -o; }
pipupdate() { python3 -m pip install --upgrade --break-system-packages "$1"; }
prune() { git remote prune origin; }
sfind() { sudo find / -iname "*$1*"; }
sha() { shasum -a 256 "$1"; }
spectre() { open -a /Applications/Google\ Chrome.app --args --incognito --app=https://spectre.pw; }
spell() { aspell --lang=en --mode=tex check "$1"; }
textbuddy() { /usr/bin/open -n -W -b com.clickontyler.TextBuddy "$1"; }
textedit() { /usr/bin/open -e -W "$1"; }
update() { brew update; brew outdated --greedy --verbose; brew upgrade --dry-run; brew cleanup -s --prune=all; rm -r -f "$(brew --cache)"; }
xattrquarantine() { xattr -d -r com.apple.quarantine "$1"; }