Just Javascript: Creating a countdown timer

In this series I create some of the most common scripts used on websites in pure Javascript. The reason for this series is I’m tired of everybody simply ‘using jQuery’ for absolutely no reason when the code they are trying to achieve can be written in a few lines of pure Javascript code.

This time we create a countdown timer.

Continue reading Just Javascript: Creating a countdown timer

Install LAMP stack on Elementary OS

Unlike most other Linux distributions Elementary OS doesn’t come preinstalled with a LAMP stack. In this tutorial I will show you from start to finish. 

First up is to get Apache installed, we can do this with the following command:

sudo apt-get install apache2

Continue reading Install LAMP stack on Elementary OS

Build a PHP login system using Laravel 5

Laravel makes it super easy to build a login system because it has everything already built and configured for you, here is how to create a login system using Laravel 5.2

Lets create a new Laravel project using composer:

 composer create-project --prefer-dist laravel/laravel login 

To get the authentication up and running we need to do a few things but luckily Laravel makes the set-up a breeze.

Continue reading Build a PHP login system using Laravel 5

How can I prevent SQL-injection in PHP?

I constantly see this question asked and the answer is so simple yet people ignore or outright refuse to use it. The answer is prepared statements with the PDO extension. There is simply no need or a solid valid argument to use mysqli or even worse mysql, mysql_* where deprecated in PHP 5.5.0 and removed completely in PHP 7.0.* so stop using it!

Continue reading How can I prevent SQL-injection in PHP?

Data breaches and the level of password security

I recently wrote a post about how to correctly hash passwords using PHP. As this story was shared on reddit it was met with the normal trolling almost every post gets on the platform. One of the issues was why did I mention such things as MD5 and SHA when the post was about correct way of password hashing. My response to this was because most tutorials (usually aimed at beginners) recommend hashing passwords with functions such as MD5 and SHA1 and I dedicated a paragraph of the article to explaining why these where bad points and why not to use them.

Continue reading Data breaches and the level of password security

Web development using Linux – Part 4: Everything else

So over this series of posts we have covered Linux operating systems, IDE’s and text editors. In this final post of the series I will cover the final bits and pieces used in a web development workflow.

Continue reading Web development using Linux – Part 4: Everything else