Skip to content

Instantly share code, notes, and snippets.

@DominikBucher12
Created September 20, 2018 15:30
Show Gist options
  • Save DominikBucher12/877aed3bdd7ed1934e78f1a4fa09e6d9 to your computer and use it in GitHub Desktop.
Save DominikBucher12/877aed3bdd7ed1934e78f1a4fa09e6d9 to your computer and use it in GitHub Desktop.
If you are curious about my .bash_profile.sh πŸ™ˆ
# MARK: PATHS
source ~/.bashrc
# MARK: πŸš€ Lastfane
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export GEM_PATH=/Users/dominikbucher/.rvm/rubies/ruby-2.4.1/bin/gem
# MARK: fkn' hkn'
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"
export LD_LIBRARY_PATH CPATH PKG_CONFIG_PATH
# MARK: Them toolz.
export PATH=/Users/dominikbucher/.rvm/gems/ruby-2.4.1/bin:$PATH
export PATH="$PATH:/Users/dominikbucher/arcanist/bin"
export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH
export PATH=/Users/dominikbucher/Downloads/format-master/bin:$PATH
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
# Token for Sloneek.
export JWTTOKEN="πŸ™ˆπŸ™ˆπŸ™ˆ"
LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:"${LD_LIBRARY_PATH}"
CPATH=/usr/local/opt/openssl/include:"${CPATH}"
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:"${PKG_CONFIG_PATH}"
# MARK: TheFuck.
source /Users/dominikbucher/arcanist/resources/shell/bash-completion
eval $(thefuck --alias)
# Aliases
alias simctl="xcrun simctl"
alias showmax="cd ~/Showmax/ios-showmax-main/apps/main"
alias visualStudio="open -a \"Visual Studio Code\""
alias ssh_to_macbook="ssh -p πŸ™ˆ"
alias ssh_to_macmini="ssh -p πŸ™ˆ"
alias go_to_CI="cd /Users/dominikbucher/Showmax/ios-showmax-main/scripts/ci"
alias ll="ls -la"
alias showmax_folder="cd /Users/dominikbucher/Showmax"
alias jenkinsPath="cd /var/log/jenkins/jenkins.log && echo '/var/log/jenkins/jenkins.log'"
alias jenkinsProjectPath="cd /Users/Shared/Jenkins/Home/workspace && echo '/Users/Shared/Jenkins/Home/workspace'"
alias recordSimulatorVideo="xcrun simctl io booted recordVideo SampleVideo.mov"
# MARK: fkn' hkn'
alias XcodeTheme="cd Applications/Xcode.app/Contents/SharedFrameworks/DVTKit/Versions/A/Resources/"
alias templates="cd /Users/dominikbucher/Library/Developer/Xcode/Templates && echo 'Moved to ~/Library/Developer/Xcode/Templates (Keep forgetting this directory πŸ€¦πŸ»β€β™‚οΈ)'"
alias defaultTemplates="cd /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates && echo 'Moved to default Xcode templates folder πŸ‘'"
function arcd() {
git lfs push origin $(git rev-parse --abbrev-ref HEAD) && arc diff "$@"
}
# Example: clearBranchesWithPrefix arcpatch
clearBranchesWithPrefix() {
# $1 - The prefix to match
params="$1"
for i in $(git branch | tr -d ' ' | egrep "^${1}")
do
git branch -D "${i}"
done
}
function ChangeColor(){
file=$1
color=$2
mogrify -path $file -format png -fuzz 30% -fill $color -opaque "#8e8e93"
}
function clearDerivedData(){
rm -rf "~/Library/Developer/Xcode/DerivedData"
if [ $? -eq 0 ]; then
echo "Successfully cleared derivedData"
else
echo "What could possibly go wrong?"
fi
}
alias cleardd="clearDerivedData"
alias cleandd="clearDerivedData"
function deleteFailedCommits() {
git reset HEAD~1
}
alias fixFuckup="deleteFailedCommits"
function apidoc() {
cd ~/Showmax/apidoc
}
function shmscripts() {
cd ~/Showmax/ios-showmax-main/scripts/
}
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
function finishReview()
{
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ $BRANCH == arcpatch* ]];
then
git reset --hard
git checkout develop
git branch -D "$BRANCH"
fi
}
# MISC
PS1='\[\e[31m\][\[\e[0m\]\W$(__git_ps1 " (\[\e[36m\]%s\[\e[0m\])")\[\e[31m\]]\[\e[0m\]\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment