Skip to content

Instantly share code, notes, and snippets.

@ademar111190
Last active February 3, 2020 20:58
Show Gist options
  • Select an option

  • Save ademar111190/2bd89c8b5fc36d5438af20d92d4651ea to your computer and use it in GitHub Desktop.

Select an option

Save ademar111190/2bd89c8b5fc36d5438af20d92d4651ea to your computer and use it in GitHub Desktop.
A .zshrc file
export ZSH="/Users/ademar/.oh-my-zsh"
ZSH_THEME="agnoster"
plugins=(
git
osx
gradle
adb
zsh-autosuggestions
docker
)
source $ZSH/oh-my-zsh.sh
eval $(thefuck --alias)
export vim=/usr/local/Cellar/vim/8.1.1500/bin/vim
export vi=$vim
export ANDROID_NDK="/Users/ademar/Library/Android/sdk/ndk-bundle"
export ANDROID_SDK="/Users/ademar/Library/Android/sdk"
export ANDROID_HOME=$ANDROID_SDK
export ANDROID_SDK_ROOT="/Users/ademar/Library/Android"
export KOTLIN_HOME="/usr/local/Cellar/kotlin/1.3.21/"
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
PATH="${PATH}:${ANDROID_HOME}"
PATH="${PATH}:${ANDROID_HOME}/platform-tools"
PATH="${PATH}:${ANDROID_HOME}/tools"
PATH="${PATH}:${ANDROID_HOME}/emulator"
PATH="${PATH}:${ANDROID_HOME}/tools/bin"
PATH="${PATH}:/Users/ademar/Scripts"
run-gradle() {
FLAVOR=$1
VARIANT="$(tr '[:lower:]' '[:upper:]' <<< ${FLAVOR:0:1})${FLAVOR:1}"
./gradlew build${VARIANT}PreBundle assemble${VARIANT}
ls app/build/outputs/apk/${FLAVOR}/ | grep apk | xargs -I % $SHELL -c "adbplus install -r app/build/outputs/apk/${FLAVOR}/%"
adbplus shell am start -n com.luizalabs.mlapp.${FLAVOR}/com.luizalabs.mlapp.home.ui.HomeActivity
}
install-apks() {
find . -name '*.apk' -not -path '**/intermediates/**' | xargs -I % $SHELL -c "adbplus install -r %"
}
alias gti=git
alias got=git
alias gt=git
alias gut=git
alias subl="open -a Sublime\ Text $@"
alias clear-branchs="git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D"
alias clear-local-gradle='find . \( -name "intermediates" -o -name "bin" -o -name "gen" -o -name "build" \) | xargs rm -rf'
alias clear-gradle="rm -rf ~/.gradle/caches && rm -rf ~/.gradle/daemon && rm -rf ~/.gradle/native && rm -rf ~/.gradle/notifications && rm -rf ~/.gradle/workers && rm -rf ~/.gradle/wrapper && find . -name 'bin' | xargs rm -rf && find . -name 'gen' | xargs rm -rf && find . -name 'build' | xargs rm -rf"
alias run-gradle-debug="run-gradle debug"
alias run-gradle-beta="run-gradle beta"
alias run-gradle-release="run-gradle release"
quill() {
ps ax | grep $1 | cut -f1 -d ' ' | xargs kill -9
}
neofetch
#!/usr/bin/env bash
adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
echo $line
device=`echo $line | awk '{print $1}'`
echo "$device $@ …"
adb -s $device $@
fi
done
[
{ "keys": ["ctrl+alt+f"], "command": "find_next_conflict" },
{ "keys": ["ctrl+alt+o"], "command": "keep", "args": { "keep": "ours" } },
{ "keys": ["ctrl+alt+t"], "command": "keep", "args": { "keep": "theirs" } },
{ "keys": ["ctrl+alt+a"], "command": "keep", "args": { "keep": "ancestor" } },
{ "keys": ["ctrl+alt+c"], "command": "list_conflict_files" },
{ "keys": ["super+\\"], "command": "toggle_side_bar" },
]
{
"folder_exclude_patterns":
[
"intermediates",
"bin",
"gen",
"build",
".gradle",
".git"
],
"font_size": 13,
"ignored_packages":
[
"Vintage"
],
"theme": "Default.sublime-theme",
"tab_size": 2,
"translate_tabs_to_spaces": true,
"draw_white_space": "all"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment