This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # inspired by https://mriet.wordpress.com/2012/07/01/merge-bubbles-are-bad/ | |
| # and http://snipplr.com/view/26715/ | |
| # 1. first rebase all your local commits into one commit, e.g. for the last 3 commits into one you can use | |
| git rebase -i HEAD~3 | |
| # and 'pick' the first, 'squash' the other commits | |
| # 2. check the commit's sha id and save it somewhere |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global user.name "John Doe" | |
| git config --global user.email [email protected] | |
| git config --global color.ui true | |
| ssh-keygen -t rsa -C"[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # select one of the 2 file versions during a merge | |
| git checkout --ours index.html | |
| git checkout --theirs _layouts/default.html | |
| # see history in a nice tree form without gitk | |
| git log --pretty=oneline --graph --decorate --all | |
| # git add all including the renamed files without loosing history of the deleted file (as a rename implicitly looks like delete file and create new file) | |
| git add . -A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Select new launch configuration | |
| 2. use /usr/bin/nohup for location | |
| 3. leave the working directory empty | |
| 4. for argument enter: | |
| gnome-terminal --working-directory=${resource_loc} | |
| 5. Save and then you are able to run it while having different locations selected in package explorer: this will open the terminal in the corresponding directories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # run: | |
| sudo netstat -lpn |grep :8080 | |
| # this will output something like: | |
| tcp6 0 0 :::8080 | |
| :::* LISTEN 6782/java | |
| # interpretation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # just add the below to setenv.sh | |
| CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=172.17.12.99" | |
| # inspired by http://blog.markshead.com/1129/connecting-visual-vm-to-tomcat-7/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while true ; do | |
| date | |
| echo "DB1 threads: `netstat -an |grep '68.20' |grep ESTABLISHED|wc -l`" ; | |
| echo "DB2 threads: `netstat -an |grep '67.20' |grep ESTABLISHED|wc -l`" ; | |
| echo "ajp threads: `netstat -an |grep 8009 |grep ESTABLISHED|wc -l`" ; | |
| echo "HINT if you see errors check details with: tail -1000 /var/log/catalina.out |grep ERROR -A 50 -B 50" | |
| tail -500 /var/log/catalina.out |grep ERROR|tail -n 20 | |
| sleep 5; | |
| clear; | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Inspired from http://blog.akquinet.de/2010/05/26/mastering-the-maven-command-line-%E2%80%93-reactor-options/ | |
| # Build only specific modules: | |
| mvn clean install -pl sub-module-name2 | |
| mvn clean install -pl sub-module-name2,sub-module-name3 | |
| # Build only starting from specific sub-module (resume from) | |
| mvn clean install -rf sub-module-name2 | |
| # Build dependencies (also make) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mysql --user=root mysql --password | |
| CREATE DATABASE your_db DEFAULT CHARACTER SET utf8; | |
| CREATE USER 'your_user'@'%' IDENTIFIED BY 'your_pass'; | |
| GRANT ALL PRIVILEGES ON your_db.* TO 'your_user'@'%'; |