-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases-public
66 lines (48 loc) · 2.77 KB
/
.aliases-public
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
alias java8="export JAVA_HOME=$JAVA8_HOME; export PATH=$JAVA8_HOME/bin:$PATH"
alias java11="export JAVA_HOME=$JAVA11_HOME; export PATH=$JAVA11_HOME/bin:$PATH"
alias java17="export JAVA_HOME=$JAVA17_HOME; export PATH=$JAVA17_HOME/bin:$PATH"
alias java21="export JAVA_HOME=$JAVA21_HOME; export PATH=$JAVA21_HOME/bin:$PATH"
alias fr="git fetch && git rebase -i"
alias frd="git fetch && git rebase -i origin/develop"
alias frm="git fetch && git rebase -i origin/main"
alias frms="git fetch && git rebase -i origin/master"
alias subsync="git submodule update -f --init --recursive"
alias rehead="git reset --hard HEAD"
alias pullprune="git pull --ff-only --prune && subsync"
alias gdh="git diff HEAD"
alias gdno="git diff --name-only"
alias gmf="git fetch && git merge --ff-only"
alias gpc="gh pr checkout"
alias hg="history | grep"
# gsed = gnu sed on Mac OSX
alias stripansi="gsed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g'"
############################################
# Docker Clean
# From https://www.calazan.com/docker-cleanup-commands/
# Kill all running containers.
alias dockerkillall='docker kill $(docker ps -q)'
# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
# Delete all untagged images.
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
# Delete all stopped containers and untagged images.
alias dockerclean='dockercleanc || true && dockercleani'
# Delete unused images more aggressively, and also build cache
alias dockerprune='docker system prune'
############################################
#################################################################
# All of Us Researcher Workbench public aliases
#################################################################
# example: runtest org.pmiops.workbench.db.model.StorageEnumsTest
# example: runtest org.pmiops.workbench.db.model.StorageEnumsTest.test_noMissingMapEntries
# example: runtest org.pmiops.workbench.db.model.*
alias runtest='./project.rb test --tests'
alias lintjava='./gradlew spotlessApply'
alias compile='./gradlew clean && ./gradlew compileGeneratedJava compileJava compileTestJava compile__tools__java compile__bigQueryTest__java compile__integration__java spotlessApply'
alias deps='./gradlew dependencies'
alias googletoken='gcloud auth print-access-token'
alias curltoken='curl -H "Authorization: Bearer `googletoken`" '
alias curlcookie='curl --cookie "FCtoken=`googletoken` '
alias curljson='curl -H "Authorization: Bearer `googletoken`" -H "Content-Type: application/json" '
# After gcloud auth login <email>, opens a website with user info, including subject ID
alias googleinfo='open https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=$(gcloud auth print-access-token)'