How to read command line arguments in a bash script

To input arguments into a Bash script, like any normal command line program, there are special variables set aside for this. The arguments are stored in variables with a number in the order of the argument starting at 1

Change password expiry in Linux

“chage” is the command to list & change the password aging information for Linux user account. The chage command changes the number of days between password expiry and the current date. Here’s a real quick on how to show the expiration date of a particular linux user account. Listing password aging for user: Change the number of days to expire: Change the password to never expire: Change account expiry to specific date:

How to fix 'error this file requires compiler and library support for the iso c++ 2011 standard'?

Solution for the error: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

How to adjust an iframe element’s height to fit its content, getElementById, scrollHeight

Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround.

gcc: How to Run C-Program in Command Prompt

You will need a C compiler to do this already installed, I use GCC. If you are on a Windows computer, you can run the command gcc -v to check if it’s already installed. If gcc is installed then it should display a host of information starting with the sentence “Using built-in specs”.

Learn PHP with the Top 25 PHP Tutorials: Resources, Websites, Courses

As we all know, PHP is a very flexible and powerful language. It has changed the way web pages work, and how users interact with it. PHP professionals are always in high demand and we would like you to join the bandwagon. If you are already in the PHP world, use these resources to stay ahead of the rest. On the other hand, if you are a novice, this article showcases a list of recommended sites that will help you get started.

Configure MongoDB in Laravel

Prerequisites: MongoDB(Must be installed and working properly) PHP(Must be installed and working properly) MongoDB PHP driver(Must be installed and working properly)

Install PHP 7.2-Mcrypt Module On Ubuntu 18.04 LTS

If you are running a PHP application that relies on the mcrypt module and you want to upgrade to PHP 7.2, then continue with the post below to learn how to install PHP 7.2 mcrypt module on Ubuntu 18.04 LTS servers and desktops…

Security Issues in Perl Scripts, Basic user input vulnerabilities, security problems

One big source of security problems in Perl scripts is improperly validated (or unvalidated) user input. Any time your program might take input from an untrusted user, even indirectly, you should be cautious. For example, if you are writing CGI scripts in Perl, expect that malicious users will send you bogus input.

PHP Approves Short Arrow Functions - Laravel News

The PHP Core team has now officially approved the addition of short arrow functions and they are hoping to have this available in PHP 7.4.

Securing RESTful API with Spring Boot, Security, and Data MongoDB

A comprehensive step by step tutorial on securing or authentication RESTful API with Spring Boot, Security, and Data MongoDB

CSS Transitions

CSS transitions allows you to change property values smoothly (from one value to another), over a given duration. Example: Mouse over the element below to see a CSS transition effect:

Regular expressions in Perl - a summary with examples

Examples of simple use in Perl statements These examples use very simple regexps only. The intent is just to show contexts where regexps might be used, as well as the effect of some “flags” to matching and replacements. Note in particular that matching is by default case-sensitive (Abc does not match abc unless specified otherwise).

JSON - JSON (JavaScript Object Notation) encoder/decoder -

JSON (JavaScript Object Notation) encoder/decoder. This module is a thin wrapper for JSON::XS-compatible modules with a few additional features. All the backend modules convert a Perl data structure to a JSON text and vice versa. This module uses JSON::XS by default, and when JSON::XS is not available, falls back on JSON::PP, which is in the Perl core since 5.14. If JSON::PP is not available either, this module then falls back on JSON::backportPP (which is actually JSON::PP in a different .pm file) bundled in the same distribution as this module. You can also explicitly specify to use Cpanel::JSON::XS, a fork of JSON::XS by Reini Urban.

Custom Error Pages | CSS-Tricks

ErrorDocument 400 /400.html ErrorDocument 401 /401.html ErrorDocument 403 /403.html ErrorDocument 404 /404.html ErrorDocument 405 /405.html ErrorDocument

How to Fix a 403 Forbidden Error

The 403 Forbidden error is an HTTP status code that means that accessing the page or resource you were trying to reach is absolutely forbidden for some reason. Different web servers report 403 Forbidden errors in different ways, the majority of which we've listed below. Occasionally a website owner will customize the site's HTTP 403 Forbidden error, but that's not too common.

How to Find Cheap Last-Minute Flights Online

Travel enthusiasts seem to be consistently split on whether booking a flight at the last minute is generally cheaper than booking in advance. The reality is that buying a ticket in the hours or days before the flight's departure can potentially reward you with a discount but so can planning ahead and purchasing your flight months before. It all comes down to how crowded the flight is, what time of year it's flying, and when in the week the plane departs. Sometimes last-minute is cheaper, sometimes it's not. The key is to frequently compare ticket prices and to keep an eye out for any promotional campaign or slow, off-peak period deals. Last-minute flights can be cheaper but they aren't always.

The 10 Best Tech Gifts to Buy in 2019 for Under $50

Read reviews and buy the best tech gifts under $50, including chargers, drones, tablets, Bluetooth speakers and more. Buying a tech gift is hard enough at the best of the times, but what about when you're on a budget? Finding anything worthwhile for under fifty bucks can seem like an impossible task, but it doesn't have to be. A few companies are making a name for themselves by offering useful, high-quality electronics at a price that won't break the bank. We've sorted through the wasteland of low-quality electronics to find the gear and gadgets truly worth buying. There's an elegant charging solution for the home, and a way of avoiding that dreaded low battery warning anywhere. We also have a perfect beginner's quadcopter drone, a high-tech camp stove, and plenty of other great, inexpensive options whether your gift is for him or her. These are the best tech gifts under $50 to buy today.

Perceived Web Performance – What is Blocking the DOM? - KeyCDN

See our recommendations on how to prevent render blocking resources from blocking the DOM and how to properly optimize them for faster page speeds.

How to Take Screenshots of Webpages from the Command Line - Boolean World

There are many situations where you might want to take screenshots of a webpage. Sure,

Prototypes in JavaScript

Problem with creating objects with constructor function syntax In the previous post, we discuss about various ways of creating objects in JavaScript. One of the ways to create objects in JavaScript is using the Constructor function. Consider the construction function below: