-
-
Ubuntu server disable IPv6
IPv6 differs from IPv4 by offering a greater range of available IP addresses. IPv6 is a 128 bit address while IPv4 is a 32 bit address. There are various reasons…
-
.gitignore
This is a file used to ignore files and directories/folders that you do not want to include in the git repository. Files or directories listed in .gitgnore are not tracked…
-
var vs let vs const in Javascript
var, let and const are used to declared variables in Javascript. VAR Used to declare variables as global scoped or function scoped. A global scoped variable is accessible anywhere in…
-
Apache2 enable and disable site(Ubuntu)
To enable or disable a site on apache we use two commands, a2ensite and a2dissite “a2ensite” is used to enable and “a2dissite” is used to disable. Both commands share same…
-
Setup KVM bridge networking on Ubuntu server
KVM provides NAT based networking to enable guest operating systems to get connectivity to the outside world. The guests sharing the same bridge are however able to communicate to each…
-
Copy on write(COW)
Copy-on-Write, is a resource management technique used in computer systems(mostly operating systems) to efficiently copy resources. It is applied by making certain pages of the memory read-only, and only keeping…
-
Add custom marker on a leaflet map
1. Get images Two images are required to make a custom icon, the image itself and a shadow of the image. For a better look the image background should be…
-
Calculate IP Addresses using PHP
We are going to use two functions PHP networking functions ip2long() and long2ip() ip2long() – Converts a string containing an (IPv4) Internet Protocol dotted address into a long integer. long2ip()…
-
JavaScript convert NaN to 0 using double tilde
In computing, NaN (not a number) is a numeric data type that means a value is undefined or cannot be represented. To convert NaN to 0 in JavaScript, use the…
