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
# if you want queries executed in all you schemas to be case insensitive do this | |
$ sudo gedit /etc/mysql/my.cnf | |
edit the file adding the entry lower_case_table_names=1 just under the group definition: [mysqld] | |
[mysqld] | |
lower_case_table_names=1 |
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) in file /var/lib/pgsql/9.3/data/postgresql.conf change the default value 'localhost' to '*' (all) as shown | |
listen_addresses = '*' | |
2) in file /var/lib/pgsql/9.3/data/pg_hba.conf add line: | |
host all all all password | |
3) if it still does not work, you bet it's iptables fault. so either stop it temporarily to verify this or add an exception for port 5432 |
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. dump | |
mysqldump -u root db_name > dump_name.sql | |
#2. restore | |
mysql -u root -p db_name < dump_name.sql |
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
# Precondition: you must have the credentials for serverId thirdparty defined in your settings.xml file like this: | |
# | |
# <servers> | |
# <server> | |
# <id>thirdparty</id> | |
# <username>your_username_goes_here</username> | |
# <password>your_password_goes_here</password> | |
# </server> | |
# ... | |
# </servers> |
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. clone the project | |
2. copy the gerrit hook from the gerrit server (http://gerritserver:8080/tools/hooks/commit-msg) to your local repo's .git/hooks/ folder | |
3. push for review like this: git push origin HEAD:refs/for/branch_name |
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. when importing public key, a .cer file needs to be created and the X509 data must be entered between these: | |
-----BEGIN CERTIFICATE----- | |
-----END CERTIFICATE----- | |
2. import a public key: | |
keytool -keystore mykeystore.jks -storepass mykeystorepass -import -noprompt -trustcacerts -alias myserveralias -file public.cer | |
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'@'%'; |
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
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 |