Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. # -------------------------------
  2. # CUSTOM KV
  3. # -------------------------------
  4. goodMorningFunction() {
  5. echo '# pull all repos';
  6. for dir in ~/work/*; do (echo "Pulling "$dir; cd "$dir" && git pull); done
  7. echo '# update brew'
  8. brew update
  9. }
  10. alias dobrojutro=goodMorningFunction
  11.  
  12. alias bashProfile='open -e .bash_profile'
  13. alias reloadBashProfile='source ~/.bash_profile'
  14. alias ..='cd ..'
  15. alias truba='ssh apps@truba.interaktivni-studio.com -i /Users/Karlo/work/karlo.pem'
  16. alias deghq='ssh apps@deghq.com -i /Users/Karlo/work/karlo.pem'
  17. alias apacheRestart='sudo httpd -k restart'
  18. alias edit="open -a TextWrangler $1"
  19.  
  20. #SHOW/HIDE
  21. alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
  22. alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
  23.  
  24.  
  25. # -------------------------------
  26. # Shortcuts to directories
  27. # -------------------------------
  28. alias home='cd ~/'
  29. alias root='cd /'
  30. alias iapp='cd /Users/Karlo/work/iapp'
  31. alias work='cd /Users/Karlo/work'
  32. alias yapp='cd /Users/Karlo/work/yapp'
  33. alias dwp='cd /Users/Karlo/work/dwp'
  34. alias front='cd /Users/Karlo/work/front'
  35.  
  36. # -------------------------------
  37. # ENVIRONMENT CONFIGURATION
  38. # -------------------------------
  39.  
  40. alias restartApache='sudo httpd -k restart'
  41.  
  42. # Change Prompt
  43. # ------------------------------------------------------------
  44. export PS1="________________________________________________________________________________\n| \w @ \h (\u) \n| => "
  45. export PS2="| => "
  46. # Set Paths
  47. # ------------------------------------------------------------
  48. export PATH="$PATH:/usr/local/bin/"
  49. export PATH="/usr/local/git/bin:/sw/bin/:/usr/local/bin:/usr/local/:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
  50.  
  51. # Set Default Editor (change 'Nano' to the editor of your choice)
  52. # ------------------------------------------------------------
  53. export EDITOR=/usr/bin/nano
  54.  
  55. # ---------------------------
  56. # NETWORKING
  57. # ---------------------------
  58.  
  59. alias myip='curl ip.appspot.com' # myip: Public facing IP Address
  60. alias netCons='lsof -i' # netCons: Show all open TCP/IP sockets
  61. alias flushDNS='dscacheutil -flushcache' # flushDNS: Flush out the DNS Cache
  62. alias lsock='sudo /usr/sbin/lsof -i -P' # lsock: Display open sockets
  63. alias lsockU='sudo /usr/sbin/lsof -nP | grep UDP' # lsockU: Display only open UDP sockets
  64. alias lsockT='sudo /usr/sbin/lsof -nP | grep TCP' # lsockT: Display only open TCP sockets
  65. alias ipInfo0='ipconfig getpacket en0' # ipInfo0: Get info on connections for en0
  66. alias ipInfo1='ipconfig getpacket en1' # ipInfo1: Get info on connections for en1
  67. alias openPorts='sudo lsof -i | grep LISTEN' # openPorts: All listening connections
  68. alias showBlocked='sudo ipfw list' # showBlocked: All ipfw rules inc/ blocked IPs
  69.  
  70. # ---------------------------
  71. # T
  72. # ---------------------------
  73. alias hosts='sudo nano /private/etc/hosts'
  74. alias vhosts='open -a TextWrangler.app /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf'
  75.  
  76.  
  77. alias edit='open -a TextWrangler $1'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement