Introduction Conditional statements are one of the most important control flows in any programming language. We use them to dictate the behavior of execution upon some condition. In Javascript, conditional blocks can be built using if, else if, else, and switch statements. The switch statement makes the control flow easy to read by making the decision against some possible outcomes to …
Automating Server Setup using Ansible and Ubuntu 20.04
Introduction Nowadays, servers need to be created and destroyed very frequently. That’s because, at times, servers get a lot of execution load while at other times the load reduces, hence wasting the system resources. A common example is eCommerce websites during the holiday seasons attracting a lot of traffic. When the nature of the application is to be scalable, there …
Configuring a REST API with Axios in Vue.js: A Tutorial
Axios is a popular JavaScript library used to make HTTP requests. It is a promise-based HTTP client used in JavaScript or with other Javascript libraries like Vue.js or React.js. Due to its isomorphic nature, Axios can run on the client and server-side simultaneously using the same codebase. Also, it is a powerful tool used collectively with async to formulate a user-friendly …
Applying Pagination to Display Multiple Records using MySQL with PHP on Ubuntu 20.04
Introduction Pagination is an important concept in building data-driven applications. When pulling out the records from the database, a large number of records may be fetched. For instance, when running the query for active users or users belonging to some specific location, a large number of users in hundreds or even thousands can be returned. Displaying this huge number of …
Implementing PHP Rate Limiting Using Redis on Ubuntu 20.04: A Tutorial
Redis, also called Remote Dictionary Server, is an open-sourced in-memory database. It is a data-structured storage system that runs on a server’s RAM, which is much quicker than the fastest Solid State Drive (SSD). As a result, Redis is very responsive and an excellent fit for rate limiting. Rate limiting restricts the number of times a user may request a …
Using Git Branches: A Tutorial
Git is an open-source version control system (VCS) that can handle projects of every size. This DevOps tool is free and open-source (Git source code on GitHub). It tracks changes in the source code, allowing multiple developers to work in sync on a non-linear development. Git was first introduced back in 2005 by Linus Torvalds. This guide will showcase how …
Using CloudSigma PaaS to Shift Java Applications into Containers
For the longest time, application development and management were completely dependent upon physical infrastructure. As businesses looked to host multiple applications on a singular hardware system, virtualization solutions like hypervisors were introduced. A hypervisor, also known as a Virtual Machine Monitor (VMM), is software that creates and runs Virtual Machines (VMs). The hypervisor will allocate resources to each guest or …
Your Guide to Installing Drupal on Ubuntu 20.04
Introduction Drupal is one of the most preferred Content Management Systems(CMS) for running blogs and managing enterprise content. Developers and businesses prefer it because of its robustness and usability. It is very customizable and it can be extended to implement a wide variety of use cases. In this tutorial, we will demonstrate how to install Drupal on Ubuntu 20.04 with …
JavaScript Tools: localStorage and sessionStorage
JavaScript (often abbreviated as JS) is one of the foundations of the modern web infrastructure. It’s a lightweight, interpreted, object-oriented programming language that supports first-class functions. JavaScript is mostly known for its implementation in dynamic web pages. Because of its features, however, JavaScript is also used in non-browser environments. In this guide, we will discuss in detail two JavaScript objects: …
Using MariaDB-as-a-Service on the CloudSigma PaaS Platform
MariaDB has been a prominent name in the world of hosting for a long time now. CloudSigma PaaS combines the best practices of MariaDB hosting and analysis on our platform in the form of CloudSigma MariaDB-as-a-Service. This service is designed to automate the technical aspect of the process and allow you to use a ready-to-work solution at a moment’s notice. …
Adding Swap Space on Ubuntu 20.04: A Tutorial
Adding swap space to your server is an excellent option to compensate for out-of-memory errors. Linux allows users to add swap space in their system when the amount of RAM in the system is full. When you create a dedicated space partition, you will allow your physical memory to run smoothly without much worrying about low disk space. Swap Overview …
Implementing Flex Layout in Angular: A How-To Guide
Introduction CSS Flex Layout is used to create flexible fluid layouts. However, when using Angular there are scenarios when we need more dynamic control over the layouts. Further, using CSS Flexbox requires complicated styling which can be hard for many developers. Flex Layout is a component engine that aims to solve this problem. It provides a set of directives that …