Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulsmehta committed Jul 20, 2021
1 parent a35653e commit 7d570f9
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 11 deletions.
68 changes: 63 additions & 5 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,30 +1,88 @@
alias ll="ls -alh"
alias gw="./gradlew"
export BASH_SILENCE_DEPRECATION_WARNING=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx

source ~/.git-completion.bash
source ~/.bashrc
alias ll="ls -alh"
alias watch="watch "
alias vim="gvim"

alias gw="./gradlew"
alias venv='source venv/bin/activate'
alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"

alias k="kubectl"
alias tf="terraform"
alias klogs="stern --context simplywise-production "

alias yarnblitz='(find . -type d -name 'node_modules' -maxdepth 3 | xargs rm -rf) && yarn --ignore-engines'
alias rnblitz='rm -rf node_modules/ && yarn -D install && npx pod-install'
alias xccopy="~/.xccopy.bash"

alias cleanbuild='lerna run clean --parallel && yarn --ignore-engines && yarn build'
alias dockerblitz='docker rm $(docker ps -a -q)'
alias dockerstop='docker stop $(docker ps -a -q)'
alias git-purge='git branch --merged | grep -v "\*" | grep -v "master" | grep -v "develop" | grep -v "staging" | xargs -n 1 git branch -d'

alias ffastlane='bundle exec fastlane'

# SW Aliases
alias sw='cd ~/git/sw/simplywise'
alias sw-mobile='cd ~/git/sw/mobile'
alias sw-web='cd ~/git/sw/simplywise.com'

parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}


export JAVA_HOME=$(/usr/libexec/java_home)
export JAVA_HOME=$(/usr/libexec/java_home -v 11)

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

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/Users/rahulm/.local/bin:$PATH"

# PHP
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"

export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

# Powerline
# Composer
export PATH="$HOME/.composer/vendor/bin:$PATH"


# Anaconda
__conda_setup="$('/Users/rahulm/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/rahulm/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/rahulm/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/rahulm/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# Activate /opt/anaconda3 env
conda activate /opt/anaconda3


# Android
export ANDROID_SDK=/Users/rahulm/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/rahulm/Library/Android/sdk

export PATH=/Users/rahulm/Library/Android/sdk/platform-tools:$PATH
export PATH=$ANDROID_SDK_ROOT/emulator/:$PATH

# Powerline Shell
function _update_ps1() {
PS1=$(powerline-shell $?)
}

if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
3 changes: 2 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
alias ll="ls -al"

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
11 changes: 11 additions & 0 deletions .vscode.extensions
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cssho.vscode-svgviewer
felixfbecker.php-intellisense
hashicorp.terraform
ms-azuretools.vscode-docker
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-vscode-remote.remote-containers
octref.vetur
Orta.vscode-ios-common-files
vscodevim.vim
5 changes: 5 additions & 0 deletions .xccopy.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# \047 ~ '
xcrun xctrace list devices 2> /dev/stdout 1> /dev/null | grep -i iphone | head -n 1 | awk '{printf "\047%s %s\047", $1, $2}' | pbcopy

9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ dotfiles
Development setup guide for new MacOS computer:

1. Install Homebrew
2. Using brew, install node, yarn, golang, spark, etc. (any devtools you want)
a. To use the `yarnblitz` and `cleanbuild` commands aliased in `.bashrc`, `yarn` and `node` need to be installed
2. Using brew, install node, yarn, golang, python, etc.
a. To use the `yarnblitz` and `cleanbuild` commands aliased in `.bashrc`, `yarn` and `node` need to be installed. To use `rnblitz`, run it from the root of a React Native repo
b. Install gvim if you want a decent graphical text editor that's still fast
3. Install ITerm2 (don't use terminal)
3. Install ITerm2
4. Install IntelliJ and VSCode - for IntelliJ get the Community Edition and then install the bash, python, typescript, and whatever other plugins
a. Alternately, install data science/python plugins for vscode
5. Install full Anaconda python 3.6 and 2.7 distributions (for compatibility sake - installing the conda3 env will allow you to generate a python2.7 env as well)
6. Install these dotfiles to the home folder, and ensure that your `.badsh_profile` loads the respective files (especially `git-completion.bash` for git tab completion)
7. Party
6. Install these dotfiles to the home folder with `bootstrap.sh`
12 changes: 12 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

cp .bash_profile $HOME
cp .bashrc $HOME
cp .gitconfig $HOME
cp .git-completion.bash $HOME
cp .ideavimrc $HOME
cp .vimrc $HOME
cp .xccopy.bash $HOME

# Requires VSCode to be installed
# cat .vscode.extensions | xargs -L 1 code --install extension

0 comments on commit 7d570f9

Please sign in to comment.