Skip to content

Instantly share code, notes, and snippets.

@chrisdchristo
Created January 6, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdchristo/8285313 to your computer and use it in GitHub Desktop.
Save chrisdchristo/8285313 to your computer and use it in GitHub Desktop.
Standard /etc/profile for Ubuntu
PS1='\[\e[0;36m\][\t] \[\e[31m\]\u@\H\[\e[32m\]$PWD \[\e[32m\]\n$\[\e[0m\] '

alias l="ls -la"

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export JRE_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export JAVA_OPTS="-Xmx1024M -Duser.timezone=UTC -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"

export MAVEN_HOME=/usr/share/maven
export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=1024M -Dgwt.compiler.localWorkers=1"
export JENKINS_HOME=/var/lib/jenkins
export TITAN_HOME=/var/lib/titan/
export ANT_HOME=/usr/share/ant/

alias jj='cd /var/lib/jenkins/'
alias jstart='sudo /etc/init.d/jenkins start'
alias jstop='sudo /etc/init.d/jenkins stop'
alias jrestart='sudo /etc/init.d/jenkins restart'
alias jlog='sudo tail -f /var/log/jenkins/jenkins.log -c 5000'

alias nn='cd /etc/nginx'
alias nstart='sudo service nginx start'
alias nstop='sudo service nginx stop'
alias nrestart='sudo service nginx restart'
alias nlog='sudo tail -f /var/log/nginx/error.log'

alias mstart='sudo service mysql start'
alias mstop='sudo service mysql stop'
alias mconfig='sudo nano /etc/mysql/my.cnf'

alias tt='cd /var/lib/titan'

tstart() {
	sudo su titan -c "/var/lib/titan/bin/titan start" &
}

tstop() {
	sudo pkill -u titan
	echo 'Titan :: OpenEJB 4.6.0 Stopped!'
}

tlog() {
	tail -f /var/lib/titan/log/titan.$(date +%Y-%m-%d).log -c 5000
}

thelp() {
	echo '[tt]: moves you to titan home dir.'
	echo '[tdeploy]: tdeploy /path/to/my/jar.jar'
	echo '[tupdate]: updates the lib and bin folders of titan'
	echo '[tstart]: starts titan'
	echo '[tstop]: stops titan'
	echo '[tlog]: tails titan log'
}

tdeploy() {
	sudo cp $1 /var/lib/titan/apps/
}

tmod() {
	echo 'Modding titan file permissions'
        sudo chown -R titan:titan /var/lib/titan
        sudo chmod -R 775 /var/lib/titan
}

nmod() {
	echo 'Modding www file permissions'
        sudo chown -R www-data:www-data /var/www/
        sudo chmod -R 775 /var/www/
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment