Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"

# Shortcuts
alias d="cd ~/Documents/Dropbox"
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/projects"
alias pl="cd ~/projects/localz"
alias plt="cd ~/projects/localz/rn/packages/rn-app-technician"
alias pla="cd ~/projects/localz/rn/packages/rn-app-attendant"
alias g="git"
alias h="history"
alias j="jobs"

# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
Expand Down
2 changes: 2 additions & 0 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ complete -W "NSGlobalDomain" defaults;

# Add `killall` tab completion for common apps
complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall;

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
17 changes: 17 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
[ -n "$PS1" ] && source ~/.bash_profile;

# added by travis gem
[ -f /Users/zwang/.travis/travis.sh ] && source /Users/zwang/.travis/travis.sh

#export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
[ -f /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/serverless.bash ] && . /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/serverless.bash
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
[ -f /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/sls.bash ] && . /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/sls.bash
# tabtab source for slss package
# uninstall by removing these lines or running `tabtab uninstall slss`
[ -f /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/slss.bash ] && . /Users/zwang/Projects/localz/hiring/serverless-gps-tracking/node_modules/tabtab/.completions/slss.bash
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@ root = true

[*]
charset = utf-8
indent_style = tab
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2

[*.{kt,kts}]
# possible values: number (e.g. 2), "unset" (makes ktlint ignore indentation completely)
indent_size=4
# true (recommended) / false
insert_final_newline=true
# possible values: number (e.g. 120) (package name, imports & comments are ignored), "off"
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
max_line_length=off
indent_style = space
5 changes: 5 additions & 0 deletions .exports
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ export GPG_TTY=$(tty);

# Hide the “default interactive shell is now zsh” warning on macOS.
export BASH_SILENCE_DEPRECATION_WARNING=1;

# Node rdkafka
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
73 changes: 73 additions & 0 deletions .extra
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Press escape for power!
# set -o vi

# Enable git command autocompletion for 'g' as well
complete -o default -o nospace -F _git g

# Reset to Git 2.0+ push.default
# git config --global push.default simple

# cd into android tools
alias androidsdk="cd ~/Library/Android/sdk/"
alias scpy="scrcpy -m 1280 --max-fps 60 --shortcut-mod=lsuper,rsuper,lctrl --show-touches --stay-awake --turn-screen-off"
alias scpyr="scrcpy -m 1280 --max-fps 60 --shortcut-mod=lsuper,rsuper,lctrl --show-touches --stay-awake --record scrcpy-recording.mp4"

# start redis
alias redis="redis-server /usr/local/etc/redis.conf &"

# flush redis
alias fr="redis-cli flushall"

# fzf
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

# git log
alias gll="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
alias gld="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -- ."

# kafka
alias ks='zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties & kafka-server-start /usr/local/etc/kafka/server.properties'

# Java 11 for Android
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_152`; java -version"
alias j11="export JAVA_HOME=`/usr/libexec/java_home -v 11`; java -version"

# List processes occupying a given port
ports() { lsof -i :$@; }

# Docker
# Get latest container ID
alias dl="docker ps -l -q"

# Get container process
alias dps="docker ps"

# Bash into running container
dbash() { docker exec -it $(docker ps -aqf "name=$1") bash; }

# Sh into running container
dsh() { docker exec -it $(docker ps -aqf "name=$1") sh; }

function dstop() { docker stop $(docker ps -aq); }
function drm() { docker rm $(docker ps -a -q); }

function fblog() {
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
}

alias fbdebug="adb shell setprop debug.firebase.analytics.app com.localz.technician.local"
alias fbundebug="adb shell setprop debug.firebase.analytics.app .none."

alias ylinks="find ~/.config/yarn/link -type l"
alias ylinked="find node_modules -type l | grep -v .bin"

function usefulcommands() {
echo "
aws sts get-caller-identity
export AWS_DEFAULT_PROFILE=external-report-dev-temp
aws s3api list-objects-v2 --bucket localz-external-reports-master-eu-west-1 --prefix SYB65K4Jpmje6LQIdxMIiMG1S24o1XplALb73000
aws s3api get-object --bucket localz-external-reports-master-eu-west-1 --key 6XSdrf8Y8wNM71tUoj90EeRxgSJlTPP7GyOG3000/rj_RFVUe8iRuj4lhnHI-trackingLinkByProject-daily-2021-04-25T23:00:00.000Z-2021-04-26T23:00:00.000Z.json report.json
"
}
14 changes: 14 additions & 0 deletions .fzf.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then
export PATH="$PATH:/usr/local/opt/fzf/bin"
fi

# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.bash" 2> /dev/null

# Key bindings
# ------------
source "/usr/local/opt/fzf/shell/key-bindings.bash"

14 changes: 14 additions & 0 deletions .fzf.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */usr/local/opt/fzf/bin* ]]; then
export PATH="$PATH:/usr/local/opt/fzf/bin"
fi

# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/usr/local/opt/fzf/shell/completion.zsh" 2> /dev/null

# Key bindings
# ------------
source "/usr/local/opt/fzf/shell/key-bindings.zsh"

Loading