-
Notifications
You must be signed in to change notification settings - Fork 0
/
.local_profile
165 lines (134 loc) · 4.35 KB
/
.local_profile
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
154
155
156
157
158
159
160
161
162
163
164
165
#export PATH="/usr/local/opt/[email protected]/bin:$PATH"
#export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
export PATH="~/.npm-global/bin:$PATH"
#export PATH="/usr/local/opt/ruby/bin:$PATH"
if which ruby >/dev/null && which gem >/dev/null; then
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
export COMPOSER_MEMORY_LIMIT=-1
#alias cat=bat
alias subl=~/subl
whoisusingport() { lsof -i tcp:$* }
searchphpmodule() { php -m | grep -e"$1" }
update_php() {
brew update
brew upgrade php
}
update_docker_sync() {
gem install docker-sync --user-install
}
docker_re() {
#Stop all Docker containers without confirmation (dangerous if running something)
docker ps -q | xargs -L1 docker stop
#Stop Docker for Mac gracefully
test -z "$(docker ps -q 2>/dev/null)" && osascript -e 'quit app "Docker"'
#Start Docker gracefully
open --background -a Docker
}
ds_restart(){
docker-sync stop
docker-sync clean && docker-sync start
}
ds_restart_f() {
docker-sync stop
docker-sync clean && docker-sync start --foreground
}
gitdate() {
GIT_COMMITTER_DATE="$1" git commit --amend
git commit --amend --date="$1"
}
#https://github.com/EugenMayer/docker-sync/blob/master/lib/docker-sync/upgrade_check.rb#L131
ds_d() {
#your-sync-name
SYNC_CONTAINER=$1 docker exec "$SYNC_CONTAINER" cat "/tmp/$( echo $( docker exec "$SYNC_CONTAINER" ls /tmp/ | grep ^unison-stdout-- ) )"
}
ds_debug() {
diff -q "$1" <(docker exec "$2" cat "/host_sync/$1")
echo "\n------------------------------"
diff -q "$1" <(docker exec "$2" cat "/app_sync/$1")
}
start_docker(){
cd /Applications/Docker/Docker\ Quickstart\ Terminal.app/Contents/Resources/Scripts
bash 'start.sh'
cd ~
}
hosts() {
sudo vim /etc/hosts
}
start_local() {
#ngrok http -region=au 192.168.99.100:$1
ngrok start $1
}
start_v() {
ngrok http -region=au 127.0.0.1:$1
}
export TTC_SAY_BOX='minions'
# List of accounts to read the last tweet from, comma separated
# The first in the list is read by the party parrot.
export TTC_BOTS='tinycarebot,selfcare_bot,magicrealismbot'
# List of folders to look into for `git` commits, comma separated.
export TTC_REPOS='~/workspace/'
export TTC_REPOS_DEPTH=4
# Location/zip code to check the weather for. Both 90210 and "San Francisco, CA"
# should be ok. It's using weather.service.msn.com behind the curtains.
export TTC_WEATHER='Wellington'
# Set to false if you're an imperial savage. <3
export TTC_CELSIUS=true
# Unset this if you _don't_ want to use Twitter keys and want to
# use web scraping instead.
#export TTC_APIKEYS=true
# Refresh the dashboard every 20 minutes.
export TTC_UPDATE_INTERVAL=5
# Twitter api keys
export CONSUMER_KEY=''
export CONSUMER_SECRET=''
export ACCESS_TOKEN=''
export ACCESS_TOKEN_SECRET=''
git_summary() {
tiny-care-terminal
}
go_to_sleep() {
pmset sleepnow
}
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section (Disabled)
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
#hg # Mercurial section (hg_branch + hg_status)
package # Package version (Disabled)
node # Node.js section
#ruby # Ruby section
#elixir # Elixir section
# xcode # Xcode section (Disabled)
swift # Swift section
#golang # Go section
php # PHP section
#rust # Rust section
#haskell # Haskell Stack section
# julia # Julia section (Disabled)
docker # Docker section (Disabled)
#aws # Amazon Web Services section
#venv # virtualenv section
#conda # conda virtualenv section
#pyenv # Pyenv section
#dotnet # .NET section
# ember # Ember.js section (Disabled)
#kubecontext # Kubectl context section
#terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
battery # Battery level and status
# vi_mode # Vi-mode indicator (Disabled)
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
SPACESHIP_PROMPT_ADD_NEWLINE=true
SPACESHIP_PROMPT_FIRST_PREFIX_SHOW=true
#SPACESHIP_TIME_SHOW=true
SPACESHIP_DIR_SHOW=true
SPACESHIP_DIR_TRUNC=9
SPACESHIP_DIR_TRUNC_REPO=false
SPACESHIP_DIR_EXPAND_USER_PATH=true