How to see a certificate expiration with OpenSSL

Question How can I see a certificate expiration with OpenSSL? I have an SSL/TLS certificate and I would like to see when it expires. Is there any way to see the expiration from command line (e.g. OpenSSL)? Answer You can…

Pretty URLs in Ruby on Rails

Question How do I generate pretty URLs in Ruby on Rails? For example, I have a URL like this for a post: How can I get pretty URLs (SEO URLs) for all posts? Answer In a Ruby on Rails application…

Adding a script (or custom code) to head in WordPress

Question What is the easiest way to add a script to head in WordPress? You often need to add a custom <script> inside <head>. For example it’s a simple way to add Google Analytics, tracking, syntax highlighting, custom JS libraries, etc. I know…

How to set the page title in Ruby on Rails

Question What is the correct way to set the page title in Rails? In a Ruby on Rails application, what is the recommended way to set the page title? For example, in the application layout you have: How do you…