Ultra Simple Handlebars, Express JS & Node JS Example 2016

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. 😉

Continue reading

CSS Image Grid

CSS Columns: Polaroid Style CSS Image Grid

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:

css image grid
Polaroid CSS Image grid with Captions

Continue reading

Node JS Server Example

Beginner Node JS Server Example with Routing

What is a Node JS Server?

Node JS gives the front-end developer (and back-end developers) the ability to use JavaScript (JS) as the back-end server-side scripting language instead of other back-end server-side languages. This is exceptionally useful for front-end JS developers looking to do server-side scripting as well. When you develop an application using Node, the application you write is the server. Node is a framework for you to build a web server. To setup and configure Node and NPM, see my tutorial.

beginner 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.

Continue reading

best linux tools

Best Linux Tools and Utilities to Install – Kali

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


adduser userone sudo

replace “userone” with the username of your choice.

Continue reading

Node and NPM

Setup Node JS and NPM for JavaScript Project – 2016

What is Node JS and NPM

..Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications. Although Node.js is not a JavaScript framework,[3] many of its basic modules are written in JavaScript, and developers can write new modules in JavaScript. –wikipedia.com

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.

Node JS runtime environment interprets JavaScript via Google V8 JavaScript engine. What makes Node JS even more attractive for back-end server development is the huge ecosystem of Node JS libraries and applications which can be implemented by other developers.

node js

Node JS installation comes with a command line utility called NPM (node package manager) which allows you to easily install, version-control, and manage dependencies of Node JS libraries (or packages), and applications, from the vast NPM online repository. NPM CLI is much like APT, only for Node Packages. Node packages are other JavaScript modules that have been created by other developers, which can be included in your own code to simplify the coding. Some common NPM packages include, Express, Angular, Jquery, etc. (visit https://www.npmjs.com/ for a complete list)

Continue reading

html css 3d cube image slider header

HTML CSS 3D Cube Slider Tutorial – 2016

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 transform 3d 1


*CSS Animations may vary slightly due to browser compatibility.


Continue reading

tesla autopilot

Tesla Autopilot Crash – Driver Killed

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.

Continue reading