Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. _run_sandbox() {
  2. if [ -d $1 ] ; then
  3. echo 'Running ~/'$1
  4. echo '__________' >> ~/sandboxes
  5. echo '# ~/' $1 >> ~/sandboxes
  6. run-sandbox ~/$1 | tee -a ~/sandboxes
  7. echo '==========' >> ~/sandboxes
  8. else
  9. echo '~/' $1 ' does not exists'
  10. fi
  11. }
  12.  
  13. alias run_proposals="_run_sandbox job-proposals-binder"
  14. alias run_profile="_run_sandbox profile-binder"
  15. alias run_mystats="_run_sandbox my-stats-frontend"
  16. alias run_onboarding="_run_sandbox onboarding-binder"
  17.  
  18. # open this settings file and read it on save
  19. alias settings="vi ~/.bash_profile && source ~/.bash_profile"
  20.  
  21. alias profile="cd ~/profile-binder"
  22. alias profile_ui="profile && cd fe-ui-components"
  23. alias proposals_build="profile_ui && node_modules/grunt-cli/bin/grunt build-dev --pkg=profile"
  24. alias proposals_watch="profile_ui && grunt watch-dev --pkg=profile"
  25.  
  26. alias proposals="cd ~/job-proposals-binder"
  27. alias proposals_ui="proposals && cd fe-ui-components"
  28. alias proposals_build="proposals_ui && node_modules/grunt-cli/bin/grunt build-dev --pkg=proposals"
  29. alias proposals_watch="proposals_ui && grunt watch-dev --pkg=proposals"
  30.  
  31. alias onboarding="cd ~/onboarding-binder"
  32. alias onboarding_ui="onboarding && cd fe-ui-components"
  33. alias onboarding_build="onboarding_ui && node_modules/grunt-cli/bin/grunt build-dev --pkg=onboarding"
  34. alias onboarding_watch="onboarding_ui && grunt watch-dev --pkg=onboarding"
  35.  
  36. alias mystats="cd ~/my-stats-frontend"
  37. alias mystats_ui="mystats && cd fe-ui-components"
  38. alias mystats_build="mystats_ui && node_modules/grunt-cli/bin/grunt build-dev --pkg=mystats"
  39. alias mystats_watch="mystats_ui && grunt watch-dev --pkg=mystats"
  40.  
  41. alias ssh_profile="ssh root@`sandbox-ip <container_id>`"
  42. alias ssh_proposals="ssh root@`sandbox-ip <container_id>`"
  43. alias ssh_onboarding="ssh root@`sandbox-ip <container_id>`"
  44. alias ssh_mystats="ssh root@`sandbox-ip <container_id>`"
  45.  
  46. # highlights the command line and shows the branch
  47. # useful to easily identify current branch and source of terminal by color
  48. parse_git_branch() {
  49. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
  50. }
  51. PS1="\u@\h \[\033[31m\]\w - \$(parse_git_branch)\[\033[00m\] $ "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement