Handlebars + Express JS + Node JS
Today I’m going to show you how to create an ultra simple Express JS server application and use the Handlebars framework to handle “modularization”. To follow along, please make sure you have Node and NPM configured on your machine. If you don’t have the required applications, read my Setup Node JS and NPM Tutorial. The following tutorial will introduce you to Handlebars (for templating), and ExpressJS. By the end of this tutorial you should have an basic understanding on how to create an application/website with what I like to call HEN (Handlebars, Express JS & Node JS) stack. 😉
CSS Columns for CSS Image Grid
CSS columns allow us to define columns in a container using the
column-count property. The
column-count property sets the number of columns in a container (such as <div></div>). Another important property is the
column-gap property, which sets the gap between each of the columns. Columns are excellent to organize content on your website.
Although CSS columns can be used in multiple ways, I am going to show you how to make a Polaroid Style CSS Image Grid with Captions, (Also referred to as a Masonry Image Grid). For our CSS image grid, we will be using HTML and CSS programming languages only, so it should be fairly simple for the beginner to follow along, especially if you have done any of my previous pure-CSS tutorials.
The CSS Image grid/gallery will have 3 columns and display “old-school” style Polaroid images. Here is an example of how our finished project will look:
Polaroid CSS Image grid with Captions
What is a Node JS Server?
In the following Node JS Server tutorial, I will show you how to create a simple Node JS Server for serving static files using Routing. Routing tells our Node JS server which files (web-pages) to send the user based on the URL request, submitted by the user, through their web browser (Chrome, Firefox, Safari, etc.).
Our Node JS Server will serve a simple index.html file with a logo, and a 404.html file when the user requests a page that does not exist. It is simple to follow and gives you an idea of how NodeJS Servers work.
Update and Upgrade Linux
Before we can install my favorite linux tools, we need to be certain to update and upgrade all the necessary packages of our distribution. This can be done by opening the Terminal and running the following:
apt-get update && apt-get upgrade
- apt-get update – updates the list of packages and their version but doesn’t actually upgrade or install the packages.
- apt-get upgrade – installs the newer version of packages based on the updated list.
This may take a while, so just let it do it’s thing while it goes through and updates all your packages/dependencies.
After upgrading and rebooting, I was having an issue booting back into Kali. This is because my laptop has 2 graphics cards (you may not have this issue). The command
lspci should help you confirm if the Nvidia is installed. If this is the case, open terminal and type:
apt-get remove nvidia* --purge
This will remove the conflicting Nvidia drivers and use Intel graphics card.
Add New User
It’s very important to add a new user to your Kali distro. While it’s okay to use ‘root’ user, it isn’t recommended you use root for everything because root has all permissions. This means that you can damage your system files if you don’t know what you are doing. Having an account with stricter permissions will protect your sensitive files.
To add a new user, simply open terminal and type:
adduser userone sudo
replace “userone” with the username of your choice.
What is Node JS and NPM
Node.js is also written as NodeJS,Node JSor just Node. I will try to keep it the wording uniform but please forgive me if I use different variations.
3D Cube Image Slider with CSS Transform
Today, I am going to show you how to create a neat CSS 3D cube slider with HTML and CSS coding languages. A spinning 3D Cube is a very cool technique to show off images as well as your coding skills. CSS has come a long way and animations are much easier to create without the need for extra languages. We will be using CSS transform and CSS animation properties to create a cube. The 3D cube, that we will design, will have pictures on each of the 6 sides, then it will spin and show all the pictures before restarting the CSS animation. Here is the HTML CSS 3D cube slider that we will be creating:
*CSS Animations may vary slightly due to browser compatibility.
What is Tesla Autopilot?
The race to fully automate a vehicle has been on for quite a while amongst the various automobile manufactures. While, the technology has been around for a couple of years, it’s still kind of new and scary when your life is in hand. A recent crash involving the Tesla Model S has literally scared Americans of the technology.
A couple weeks ago, I visited a Tesla store at a local mall and checked out the Tesla Model S in person. And let me tell you, it’s an Ipad on wheels! I mean everything is touchscreen controlled, from the radio to the doors. I’m not a big fan of electric vehicles, however, in the future I believe electric vehicles will replace all gas vehicles, whether or not I like it. Even though I love gas-guzzling sports cars, I can’t help but welcome the new electric cars because of the cutting-edge technology that the manufacturers incorporate.