Sunday, September 13, 2015

Creating a static home page for your Blogger blog

Sometimes you might want to create a static home page for your blogger blog instead of the default page with your blog posts. Adding a new home page is a really easy thing and here is how you do that.

Step 1 - Creating a new page


Select Pages from the main menu and select New Page button. Add page details like this.



After entering the details, publish the page. After that, your page should look like this.


Step 2 - Redirecting blogger homepage


Select Settings -> Search Preference.


After that, Change the Custom Redirect settings like below.

From: /
To:     /p/home-page.html

Note: home-page.html is the page name that you created earlier and you have to check the Permanent check box.



After setting the redirection settings, when you browse your blog, it will automatically redirect to the Home Page that you created.



But our work is not done, we need add a Menu to our blog and a Menu Item to link out previous Home Page to our new Home Page.

Step 3 - Adding a Menu to the blog


Select Layout and click on the Add a Gadget link in the Cross-Column section.



Select Pages from the gadget list.



Deselect the Home and check the Home Page check box.



At this point, our blog will look like this.



Now we have a Home Page menu item.


Step 4 - Adding a new Menu Item


Select the Edit link of the Cross-Column section in the Layout.



Click on the + Add external link.


Enter a name for the menu item and enter the page URL as below. In my case, the URL is http://shan1024.blogspot.com/index.html.



Now our work is done. Save everything and your blog should look like this.



If you followed the steps correctly, now you have a static home page.


Saturday, September 12, 2015

Introduction to Node.js

Introdution


Node.js is an open-source, cross platform runtime environment for developing server-side web applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on Microsoft Windows, OS X, Linux and various other operating systems. Node.js is built on Chrome's V8 JavaScript engine.

What is V8?


V8 is Google's open source high-performance JavaScript engine written in C++. It is used in Google Chrome, the open source browser. V8 can run standalone or can be embedded into any C++ application.

More about Node.js


Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm is the largest ecosystem of open source libraries in the world.


You can download the latest Node.js version at https://nodejs.org/en/download/

Thursday, September 10, 2015

Creating a self-signed SSL certificate

To generate a self-signed certificate, run the following commands in your shell:

openssl genrsa -out key.pem

openssl req -new -key key.pem -out csr.pem

openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem

rm csr.pem


This should leave you with two files, cert.pem (the certificate) and key.pem (the private key). This is all you need for a SSL connection.