How to read a certificate request (csr) with openssl

It’s “easy” — if you can remember arcane switches and parameters. I can’t, so I saved it here.

openssl req -in mycsr.csr -noout -text

Posted in Linux, Mac OS X, SSL | Comments Off on How to read a certificate request (csr) with openssl

How to compress speech mp3

A lot of church sites want to put their sermons on the web. They record their sermons to mp3 and upload them to their site. Unfortunately a sermon can take up 50 meg or more. It does not take long to use up your web hosting quota that way.

To solve this problem, use Lame, which can easily be installed in most linux distributuions. On ubuntu, use

apt-get install lame

Once installed, if your original (large) sound file is sermon.mp3, you would want to do the following command:

lame --abr 16 -q 0 -m m sermon.mp3 sermon_compressed.mp3

You will find that the sermon_compressed.mp3 file that is generated is much smaller than the original. I saw a reduction in size from 49 meg to 7 meg for at 40 minute mp3 speech file.

Posted in Linux | Comments Off on How to compress speech mp3

How to configure bind9 for Microsoft lync

So they asked you to configure dns for microsoft lync and you have no idea how to do this. Well me too, until today. If you have never seen this before, it will throw you for a loop. The protocols are implemented using subdomains, see the _tls and _tcp protocols below.

Example bind9 zone file


@ IN SOA ns1.somehosting.net. hostmaster.somehosting.net. 2012110201 3600 900 1209600 1800
@ IN NS ns1.somehosting.net.
@ IN NS ns2.somehosting.net.
@ IN MX 5 smtp.yourdomain.com.
@ IN TXT MS=ms987654321
@ IN A 216.99.99.99.99
smtp IN A 70.99.99.99
www IN A 216.99.99.99
sip IN CNAME sipdir.online.lync.com.
lyncdiscover IN CNAME webdir.online.lync.com.
_sipfederationtls._tcp IN SRV 1 100 5061 sipfed.online.lync.com.
_sip._tls IN SRV 1 100 443 sipdir.online.lync.com.

Posted in DNS, Linux, Microsoft | Comments Off on How to configure bind9 for Microsoft lync

Pictures of a cool datacenter

http://www.engadget.com/photos/inside-google-s-data-centers/

Posted in Uncategorized | Comments Off on Pictures of a cool datacenter

How to repair all tables in all databases in MySQL

When your server loses power unexpectedly, or the kernel panics or otherwise terminates unexpectedly, your mysql tables are probably going to be damaged.

You might not find out about it for a while. It is a good idea to check and repair all your databases before the problems get worse.

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

That command will fix your databases. I was seeing a lot of locks and queries failing that should not have failed, and this command fixed it for me.

Posted in Linux, mysql | Comments Off on How to repair all tables in all databases in MySQL