Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.36 KB | None | 0 0
  1. # export PATH=$PATH:/Developer/android-ndk-r8/prebuilt/darwin-x86/bin
  2. # export PATH=$PATH:/Developer/android-ndk-r8/toolchains
  3. # export PATH=$PATH:/Developer/android-ndk-r8/tools
  4. # export PATH=$PATH:/Developer/android-ndk-r8
  5.  
  6. export PATH=$PATH:/Developer/emsdk/emsdk-portable/emsdk_portable/emscripten/1.7.8/
  7.  
  8.  
  9. export PATH=$PATH:/Developer/adt-bundle-mac/sdk/build-tools/19.0.2
  10. export PATH=$PATH:/Developer/adt-bundle-mac/sdk/platform-tools
  11. export PATH=$PATH:/Developer/adt-bundle-mac/sdk/tools
  12. export PATH=$PATH:/Developer/LostPrequel/LostChapters
  13.  
  14.  
  15. export PATH=$PATH:/Developer/SyncGraph/LostChapters/tools/gifts
  16.  
  17. # export ANDROID_HOME="/Developer/adt-bundle-mac/sdk"
  18. # export NDKROOT="/Developer/android-ndk-r8"
  19.  
  20.  
  21. export STORM_FIRE_ROOT=/Developer/StormFire
  22.  
  23. ##
  24. # Your previous /Users/aarsentiev/.bash_profile file was backed up as /Users/aarsentiev/.bash_profile.macports-saved_2012-03-23_at_16:25:37
  25. ##
  26.  
  27. # MacPorts Installer addition on 2012-03-23_at_16:25:37: adding an appropriate PATH variable for use with MacPorts.
  28. export PATH=$PATH:/opt/local/bin:/opt/local/sbin:$PATH
  29. # Finished adapting your PATH environment variable for use with MacPorts.
  30.  
  31.  
  32. # Setting PATH for Python 3.2
  33. # The orginal version is saved in .bash_profile.pysave
  34. export PATH=$PATH:"/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
  35.  
  36. # add Python 2.7.6
  37. #export PATH="/usr/local/Cellar/python/2.7.6_1/bin/":$PATH
  38.  
  39.  
  40. #export PATH=$PATH:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
  41. #export PATH=$PATH:/Developer/android-ndk-r8/toolchains/llvm-3.1/prebuilt/darwin-x86/bin
  42. #export PATH=$PATH:/Developer/android-ndk-r8/toolchains/llvm-3.2/prebuilt/darwin-x86/bin
  43. #export ANT_HOME="/Developer/NVPACK/apache-ant-1.8.2"
  44. #export PATH=$PATH:/Developer/NVPACK/apache-ant-1.8.2/bin
  45. #export PATH=$PATH:/Deveoper/NVPACK/apache-ant-1.8.2/bin
  46. #export PATH=$PATH:/Developer/Dasha/boost/boost_1_54_0_rc1/boost_1_54_0/stage/lib
  47. # Setting PATH for Python 2.7
  48. # The orginal version is saved in .bash_profile.pysave
  49. # PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
  50. export PATH
  51. export EDITOR=nano
  52.  
  53. source "`brew --prefix`/etc/grc.bashrc"
  54.  
  55. function tab_name {
  56. printf "\e]1;$1\a"
  57. }
  58.  
  59. function h.cdLost {
  60. cd "/Developer/LostPrequel/LostChapters"
  61. }
  62.  
  63. function h.cdLostAndroid {
  64. cd "/Developer/LostPrequel/LostChapters/android"
  65. }
  66.  
  67. function h.cdApkDropbox {
  68. cd ~/Dropbox/Projects/nexters/apk
  69. }
  70.  
  71. function h.logLostJava {
  72. tab_name "Lost_Java"
  73. adb logcat | grep D/lost
  74. }
  75.  
  76. function h.logLostCpp {
  77. tab_name "Lost_Cpp"
  78. adb logcat | grep cocos2d
  79. }
  80.  
  81. function h.log {
  82. adb logcat | grep -e 'I/DEBUG' -e 'System.err' -e 'Fatal' -e 'D/lost' -e 'D/cocos2d-x' -e 'ABORTING' -e "InApp" -e "Error" -e "died" -e "crashed" -e "SIG" -e "stack" -e "dalvikvm" #| highlights 'I/DEBUG|System.err|Fatal|error' 'D/cocos2d-x|ok|true|success' 'D/lost|warning|false' '0|1|2|3|4|5|6|7|8|9' '' '[|]|(|)|<|>'
  83. }
  84.  
  85. function h.updateProfile {
  86. source ~/.bash_profile
  87. }
  88.  
  89. function h.config {
  90. subl "~/.bash_profile"
  91. }
  92. function h.sshTest {
  93. ssh socexp@socexp-test.i
  94. }
  95.  
  96. function h.sshDev {
  97. ssh socexp@socexp-dev.i
  98. }
  99.  
  100. function h.sshRc1 {
  101. ssh socexp@socexp-rc1.i
  102. }
  103.  
  104. function h.sshRelease {
  105. ssh socexp@socexp-w1.i
  106. }
  107.  
  108. function h.sshAdmin {
  109. ssh mobclient@mobclient.i
  110. }
  111.  
  112. function subl {
  113. "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $@
  114. }
  115.  
  116. function h.test {
  117. echo "you make it" > tmp
  118. echo "you take it" >> tmp
  119. echo "you cake it" >> tmpƒ
  120. echo "you bake it" >> tmp
  121. echo "you wake it" >> tmp
  122.  
  123. GREP_COLOR='1;32' grep -P "(take|cake|bake)" --color=always tmp | GREP_COLOR='1;33' grep -P "(cake|bake)" --color=always -A10000 -B10000 | GREP_COLOR='1;34' grep -P "(bake)" --color=always -A10000 -B10000
  124. }
  125.  
  126. function h.rmGameMac {
  127. rm -r /Users/aarsentiev/Library/Caches/cocos2dx/*
  128. }
  129.  
  130. function h.crashlyticsDeployIE {
  131. /Developer/LostPrequel/LostChapters/ios/Crashlytics.framework/submit dfe07f3b548d9a23415ad5a49c4842e463375708 2c7036c51a42232e256dd6314088d7e60bd2e96d6a6472dea32eeee2bcdd60b4 -ipaPath /Users/aarsentiev/Desktop/ie2.ipa -groupAliases nexters-mobile-testers
  132. }
  133.  
  134. function h.chmodAtlBuildXAndBuild {
  135. chmod -R +x /Developer/SyncGraph/LostChapters/tools
  136. chmod +x /Developer/SyncGraph/LostChapters/build_atlases.sh
  137. /Developer/SyncGraph/LostChapters/build_atlases.sh
  138. }
  139.  
  140. function h.h {
  141. echo " version deploy:"
  142. echo "php /home/socexp/wwwroot/socexp.web/utils/client_deploy.php release_an 4.0055"
  143. echo " make proto symlink:"
  144. echo "ln -s ../deploy_fb/proto/ proto"
  145. }
  146.  
  147. function h.valgrind {
  148. valgrind \
  149. --dsymutil=yes \
  150. --gen-suppressions=yes \
  151. --leak-check=yes \
  152. --suppressions=/Developer/LostPrequel/LostChapters/tools/profiles/ie_valgrind.supp \
  153. /Developer/LostPrequel/LostChapters/ios/DerivedData/LostChapters/Build/Products/Debug/LostChapters_mac.app/Contents/MacOS/LostChapters_mac
  154. }
  155.  
  156. function h.getCrashes {
  157. sudo sh /Developer/SyncGraph/LostChapters/tools/sync_crashes.sh
  158. }
  159.  
  160. function h.chmodWXFolder {
  161. sudo chmod -R +rw $@
  162. }
  163.  
  164. function h.openSubl.canvas {
  165. subl "/Developer/socexp_client/ -n"
  166. }
  167.  
  168. function h.openSubl.proto {
  169. subl "/Developer/socexp_proto/ -n"
  170. }
  171.  
  172. function h.openSubl.ie.tools {
  173. subl "/Developer/LostPrequel/LostChapters/tools/ -n"
  174. }
  175.  
  176. function h.assets_manager {
  177. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" $@
  178. }
  179.  
  180. function h.assets_manager.update_remote_assets {
  181. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" "update_remote_assets" $@
  182. }
  183.  
  184. function h.assets_manager.remove_remote_archives {
  185. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" "remove_remote_archives" $@
  186. }
  187.  
  188. function h.assets_manager.upload_so {
  189. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" "upload_so" $@
  190. }
  191.  
  192. function h.assets_manager.build_upload_assets {
  193. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" "build_upload_assets" $@
  194. }
  195.  
  196. function h.assets_manager.build_remote {
  197. "/Developer/LostPrequel/LostChapters/tools/assets_manager.py" "build_remote" $@
  198. }
  199.  
  200.  
  201.  
  202. #!/bin/bash
  203.  
  204. # DESCRIPTION:
  205. # * h highlights with color specified keywords when you invoke it via pipe
  206. # * h is just a tiny wrapper around the powerful 'ack' (or 'ack-grep'). you need 'ack' installed to use h. ack website: http://beyondgrep.com/
  207. # INSTALL:
  208. # * put something like this in your .bashrc:
  209. # . /path/to/h.sh
  210. # * or just copy and paste the function in your .bashrc
  211. # TEST ME:
  212. # * try to invoke:
  213. # echo "abcdefghijklmnopqrstuvxywz" | h a b c d e f g h i j k l
  214. # GITHUB
  215. # * https://github.com/paoloantinori/hhighlighter
  216.  
  217. highlights() {
  218.  
  219. _usage() {
  220. echo "usage: YOUR_COMMAND | h [-idn] args...
  221. -i : ignore case
  222. -d : disable regexp
  223. -n : invert colors"
  224. }
  225.  
  226. local _OPTS
  227.  
  228. # detect pipe or tty
  229. if test -t 0; then
  230. _usage
  231. return
  232. fi
  233.  
  234. # manage flags
  235. while getopts ":idnQ" opt; do
  236. case $opt in
  237. i) _OPTS+=" -i " ;;
  238. d) _OPTS+=" -Q " ;;
  239. n) n_flag=true ;;
  240. Q) _OPTS+=" -Q " ;;
  241. # let's keep hidden compatibility with -Q for original ack users
  242. \?) _usage
  243. return ;;
  244. esac
  245. done
  246.  
  247. shift $(($OPTIND - 1))
  248.  
  249. # check maximum allowed input
  250. if (( ${#@} > 12)); then
  251. echo "Too many terms. h supports a maximum of 12 groups. Consider relying on regular expression supported patterns like \"word1\\|word2\""
  252. exit -1
  253. fi;
  254.  
  255. # set zsh compatibility
  256. [[ -n $ZSH_VERSION ]] && setopt localoptions && setopt ksharrays && setopt ignorebraces
  257.  
  258. local _i=0
  259.  
  260. if [ -z $n_flag ]; then
  261. #inverted-colors-last scheme
  262. _COLORS=( "underline bold red" "underline bold green" "underline bold yellow" "underline bold blue" "underline bold magenta" "underline bold cyan" "bold on_red" "bold on_green" "bold black on_yellow" "bold on_blue" "bold on_cyan" "bold on_magenta" )
  263. else
  264. #inverted-colors-first scheme
  265. _COLORS=( "bold on_red" "bold on_green" "bold black on_yellow" "bold on_blue" "bold on_magenta" "bold on_cyan" "bold black on_white" "underline bold red" "underline bold green" "underline bold yellow" "underline bold blue" "underline bold magenta" )
  266. fi
  267.  
  268. # build the filtering command
  269. for keyword in "$@"
  270. do
  271. local _COMMAND=$_COMMAND"ack $_OPTS --noenv --flush --passthru --color --color-match=\"${_COLORS[$_i]}\" '$keyword' |"
  272. _i=$_i+1
  273. done
  274. #trim ending pipe
  275. _COMMAND=${_COMMAND%?}
  276. #echo "$_COMMAND"
  277. cat - | eval $_COMMAND
  278. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement