Thursday, 5 September 2013
Mysql table size
Hello,
In order to figure out the table sizes in mysql database, use the following query
SELECT table_name AS "Table", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "elyapimi" ;
Hope it helps you out,
Cheers
Tuesday, 3 September 2013
Html Img Vertical Alignment
Hello,
I have just bumped into an interesting problem about centering an image vertically in html.
Thanks to 6 Methods For Vertical Centering With CSS for coming up various solutions. Just used the Line-Height method.
.img-wrapper
{
line-height: 200px; // for me, this value is bigger than the image height
}
.img-wrapper img
{
vertical-align:middle;
}
Hope this helps,
I have just bumped into an interesting problem about centering an image vertically in html.
Thanks to 6 Methods For Vertical Centering With CSS for coming up various solutions. Just used the Line-Height method.
.img-wrapper
{
line-height: 200px; // for me, this value is bigger than the image height
}
.img-wrapper img
{
vertical-align:middle;
}
Hope this helps,
Wednesday, 21 August 2013
Tomcat 7 SSL configuration
Hello,
I am going to explain how the ssl is configured in tomcat 6-7 (which works along with apache for https).
1) use the following open ssl command in order to produce the p12 keystore file
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
SSLCertificateFile="${SSL_CRT_FILE_PATH}"
SSLCertificateKeyFile="${SSL_PRIKEY_FILE_PATH}"
keystoreFile="${SSL_P12_KEYSTORE_FILE_PATH}"
keystorePass="${EXPORT_PASS_IN_STEP_1}" keystoreType="pkcs12" />
Restart your tomcat and try it out using 8443 port. (https://localhost:8443/yourAppPath/)
Check tomcat ssl configuration for more information.
Hope this helps you out!
Cheers
I am going to explain how the ssl is configured in tomcat 6-7 (which works along with apache for https).
1) use the following open ssl command in order to produce the p12 keystore file
openssl pkcs12 -export -in mycert.crt -inkey mykey.key -out mycert.p12 -name tomcat -CAfile myCA.crt -caname root -chain
You are going to be asked for an export password which you are going to use in the next step. Just type your password.
2) In ${TOMCAT_HOME}/conf/server.xml change the following lines
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />
to
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
SSLCertificateFile="${SSL_CRT_FILE_PATH}"
SSLCertificateKeyFile="${SSL_PRIKEY_FILE_PATH}"
keystoreFile="${SSL_P12_KEYSTORE_FILE_PATH}"
keystorePass="${EXPORT_PASS_IN_STEP_1}" keystoreType="pkcs12" />
Restart your tomcat and try it out using 8443 port. (https://localhost:8443/yourAppPath/)
Check tomcat ssl configuration for more information.
Hope this helps you out!
Cheers
Tuesday, 13 August 2013
SSH login without password
Hello,
In order to login using ssh without any password from computer A to computer B please follow the steps:
1) In computer A, open a console and type ssh-keygen -t rsa. Please do not provide any input to the questions that are asked.
2) In computer B, create a directory as ~/.ssh and set permission to 700
3) In computer A, type cat ~/.ssh/id_rsa.pub | ssh b@B 'cat >> ~/.ssh/authorized_keys'
4)In computer B, set ~/.ssh/authorized_keys file to 640
5) In computer A, check if ssh requires password by typing ssh b@B;
Hope it works for you.
Ps: Thank you Ssh login without password for this valuable information.
In order to login using ssh without any password from computer A to computer B please follow the steps:
1) In computer A, open a console and type ssh-keygen -t rsa. Please do not provide any input to the questions that are asked.
2) In computer B, create a directory as ~/.ssh and set permission to 700
3) In computer A, type cat ~/.ssh/id_rsa.pub | ssh b@B 'cat >> ~/.ssh/authorized_keys'
4)In computer B, set ~/.ssh/authorized_keys file to 640
5) In computer A, check if ssh requires password by typing ssh b@B;
Hope it works for you.
Ps: Thank you Ssh login without password for this valuable information.
Monday, 29 July 2013
WGET Oracle JDK
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u25-b20/jdk-7u25-linux-x64.tar.gz"
Hope works for you!
Hope works for you!
Saturday, 18 May 2013
Find big files in Linux
Just got this command to see the big files in my system.
find / -type f -size +10000k -exec ls -lh {} \; | awk '{ print $5 ": " $9 }'
you can play with parameters ($5, $9) i think it is changing wrt your system.
Thanks to http://www.cyberciti.biz/faq/find-large-files-linux/ for this valuable information
Subscribe to:
Posts (Atom)