Posted By

alejandrombernardis on 06/18/11


Tagged

profile


Versions (?)

Sh | .profile


 / Published in: Bash
 

URL: http://www.alejandrob.com.ar/

  1. # Colors
  2. export CLICOLOR=1
  3. export LSCOLORS=gxfxcxdxbxegedabagacad
  4.  
  5. # Listed
  6. alias l='ls -l';
  7. alias l.='ls -d .*'
  8. alias ll='ls -Al';
  9. alias la='ls -A';
  10.  
  11. # History
  12. export HISTCONTROL=ignoredups:ignorespace
  13. export HISTSIZE=5000
  14. export HISTFILESIZE=1000
  15. export HISTIGNORE="ls:cd:[bf]g:exit:..:...:ll:lla"
  16. alias h='history'
  17.  
  18. # Misc
  19. alias untar='tar xvfz'
  20. alias h='cd ~'
  21. alias ..='cd ..'
  22. alias ...='cd ../..'
  23. alias ....='cd ../../..'
  24.  
  25. # Flash debugger
  26. alias flashlog='tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
  27. alias ctfl='open -a /Applications/Utilities/Console.app/ ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
  28. alias rtfl='cat /dev/null > ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt'
  29.  
  30. # Remove
  31. alias rmpyc='find . -name "*.pyc" -exec rm -rf {} \;'
  32. alias rmsvn='find . -name ".svn" -exec rm -rf {} \;'
  33. alias rmdot='find . -name ".*" -exec rm -rf {} \;'
  34. alias rmxattr='sudo xattr -d -r com.apple.quarantine *'
  35.  
  36. # Java
  37. export ANT_HOME=/usr/share/ant
  38. export JAVA_HOME=/Library/Java/Home
  39. export CATALINA_HOME=/Library/Tomcat/Home
  40. export CATALINA_BLAZEDS_HOME=/Library/TomcatBlazeds
  41.  
  42. # Tomcat
  43. alias tomup='$CATALINA_HOME/bin/startup.sh'
  44. alias tomdown='$CATALINA_HOME/bin/shutdown.sh'
  45. alias tomlog='tail -f $CATALINA_HOME/logs/catalina.out'
  46.  
  47. # Tomcat & BLAZEDS
  48. alias blazedsup='$CATALINA_BLAZEDS_HOME/tomcat/bin/startup.sh'
  49. alias blazedsdown='$CATALINA_BLAZEDS_HOME/tomcat/bin/shutdown.sh'
  50. alias blazedslog='tail -f $CATALINA_BLAZEDS_HOME/tomcat/logs/catalina.out'
  51.  
  52. # Dev
  53. development=/Volumes/Development
  54. projects=${development}/projects
  55. repositories=${projects}/__repositories__
  56.  
  57. # Alias DEV
  58. alias dev='cd $projects'
  59. alias hgcm='hg commit'
  60. alias hgps='hg push'
  61. alias hgpu='hg pull'
  62. alias py='python'
  63.  
  64. # Mercurial
  65. hgrepo(){
  66. if [ "${#1}" -gt "0" ]; then
  67. target=$repositories'/hg--'$1
  68. if [ ! -d $target ]; then
  69. mkdir -p $target
  70. hg init $target
  71. cfg=$target/.hg/hgrc
  72. touch $cfg
  73. echo '[paths]' > $cfg
  74. echo 'default-push = '$target >> $cfg
  75. echo 'create: '$target
  76. if [ "${#2}" -gt "0" ]; then
  77. ide=${projects}/$2
  78. if [ -d $ide ]; then
  79. prj=$ide/$(date +%Y%m%d%H%M%S)'--'$1
  80. hg clone $target $prj
  81. mkdir -p $prj/branches
  82. mkdir -p $prj/tags
  83. mkdir -p $prj/trunk
  84. ignore=$prj/.hgignore
  85. echo 'syntax: glob' > $ignore
  86. echo '*.coverage' >> $ignore
  87. echo '*.egg-info' >> $ignore
  88. echo '*.log' >> $ignore
  89. echo '*.pyc' >> $ignore
  90. echo '*.db' >> $ignore
  91. echo '*.swp' >> $ignore
  92. echo '*.swo' >> $ignore
  93. echo '*.zip' >> $ignore
  94. echo '*.orig' >> $ignore
  95. echo '*.cfg' >> $ignore
  96. echo '*.tox' >> $ignore
  97. echo '*~' >> $ignore
  98. echo 'trunk/docs/output' >> $ignore
  99. echo '.git' >> $ignore
  100. echo '.gitignore' >> $ignore
  101. echo 'clone: '$prj
  102. fi
  103. fi
  104. fi
  105. fi
  106. }
  107.  
  108. # Subversion
  109. svnrepo(){
  110. if [ "${#1}" -gt "0" ]; then
  111. target=$repositories'/svn--'$1
  112. if [ ! -d $target ]; then
  113. mkdir $target
  114. svnadmin create $target
  115. svn mkdir --message="Setting up the directories..." --username admin \
  116. file:///$target/branches \
  117. file:///$target/tags \
  118. file:///$target/trunk;
  119. echo 'create: '$target
  120. if [ "${#2}" -gt "0" ]; then
  121. ide=${projects}/$2
  122. if [ -d $ide ]; then
  123. prj=$ide/$(date +%Y%m%d%H%M%S)'--'$1
  124. svn co file://$target $prj
  125. echo 'checkout: '$prj
  126. fi
  127. fi
  128. fi
  129. fi
  130. }

Report this snippet  

You need to login to post a comment.