Month: January 2021

Amazon Elastic Compute Cloud – EC2

Elastic Compute Cloud (EC2) refers to compute (server) resources. In AWS, servers are called Amazon EC2 instances or just “instances”. You can install application instances, web instances, database instances, gaming…

Java Linked List

The Internet is full of code examples on how you can create your own LinkedList class. Java provides and very easy to use class LinkedList. Following is an example on…

How to encrypt a string in PHP

The following code encrypts a string. crypt() function encrypts the string. The last line prints the encrypted string. There is no such function called decrypt(). This is because crypt uses…

Perl $_ vs. $_[]

For a beginner, Perl can be a frightening language. This is largely due the numerous special variables used in perl. Once a programmer understands the special variables, he/she begins to…

for loop in bash

For loops in bash a similar to commonly used languages such as Perl and C. bash loops do not use curly brackets for body demarcation. Example 1 Loop start from…

Linux: Copy all files with exception

Sometime we need to copy entire directory with the except of a few files or a specific directory. This could easily be accomplished with a regular expression as follows: Note:…

PHP Unit Testing with SimpleTest

What is Unit Testing Most developers agree that testing is important but few test their code. Even fever do it methodically. Many developers do not realize that there is a…