Mac环境变量

@bingoogolapple 2014-09-29 01:30:09发表于 bingoogolapple/bingoogolapple.github.io 开发环境

自定义别名

################################## 自定义别名 START ##################################

# ===================== Android 通用 START =====================
# 以 action 方式打开 Activity
alias start_aa="adb shell am start -a"
# 以 component 方式打开 Activity
alias start_an="adb shell am start -n"
# 打开应用程序列表
alias settings_app="start_aa android.settings.APPLICATION_SETTINGS"
# 打开开发者设置界面
alias settings_developer="start_aa com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS"
# 打开系统设置页面
alias settings_home='start_aa android.settings.SETTINGS'
# 打开 WiFi 设置页面
alias settings_wifi='start_aa android.settings.WIFI_SETTINGS'

# 点击
alias input_tap="sleep 1 && adb shell input tap"
# 按键输入
alias input_keyevent="adb shell input keyevent"

# 滑动
alias input_swipe="adb shell input swipe"
# 滑动到底部。最后的 50 标识 50 毫秒的滑动时间,越小惯性滑动越远;如果太小的话就会变成单击事件
alias input_swipe_to_bottom="sleep 1 && input_swipe 300 700 300 120 50"
# 滑动到顶部
alias input_swipe_to_top="sleep 1 && input_swipe 300 120 300 700 50"
# 向下滑动一页
alias swipe_page_down="input_swipe 300 700 300 120 500"

# 下一个输入框获取焦点
alias next_et="input_keyevent KEYCODE_DPAD_DOWN"
# 移动到末尾、清空
alias clear_et="input_keyevent KEYCODE_MOVE_END && input_keyevent --longpress $(printf 'KEYCODE_DEL %.0s' {1..50})"
# 最顶部的输入框获取焦点
alias start_input="input_keyevent KEYCODE_DPAD_UP KEYCODE_DPAD_UP KEYCODE_DPAD_UP KEYCODE_DPAD_UP"
# 移动到末尾、清空、输入
alias input_text="clear_et && adb shell input text"
# 最顶部的输入框输入文本
alias start_input_text="start_input && input_text"
# 在下一个文本框中输入
alias next_input_text="next_et && input_text"
# ===================== Android 通用 END =====================

alias showhiddenfile="defaults write com.apple.finder AppleShowAllFiles -bool true"
alias notshowhiddenfile="defaults write com.apple.finder AppleShowAllFiles -bool false"

alias ss_enabled='export all_proxy=socks5://127.0.0.1:1080'
alias ss_disabled='unset all_proxy'

alias rnandroid="react-native run-android"
alias rnstart="react-native start"
alias rnadb="adb reverse tcp:8081 tcp:8081"

alias stopAllContainer='docker stop $(docker ps -aq)'
alias rmAllContainer='docker rm -v $(docker ps -aq)'
alias rmAllVolume='docker volume rm $(docker volume ls -q)'
alias stopAndRmAllContainer='stopAllContainer && rmAllContainer'

alias touyingyi='adb connect 192.168.199.103'

alias debugWebview='spy-debugger -w true'
alias genjson="flutter packages pub run build_runner build"

# 服务器别名
alias sshserver="ssh -p 端口号 用户名@IP地址"
################################## 自定义别名 END ##################################