Autostarting scripts on startup in ubuntu

Let us say you want to run a script whenever your machine starts or restarts. This script might start any other program/software. In my case, I have a script that I want to run and it’s path is /home/ubuntu/serverstart.sh. This script simply starts a python server. To make sure that this script is always triggered after a restart or a shutdown, a service needs to be created. Steps Create a file named serverstart.

Backup and restore of data in PostgreSQL

Backing up the data using pg_dump Consider a remote postgres instance like AWS RDS. To backup the data that is currently present in a database in that RDS server, we can use the following command pg_dump -U master_user -d blog_db -h dbhost.rds.amazonaws.com -vx -Fc > blog_export.pgsql The options v - Verbose output of the operation x - Do not dump privileges. This makes sure that the statements such as grant/revoke are not added.
Java 9 Modules

Java 9 Modules

Java Platform Module System What are Modules Modules are a new way of keeping code and data together in Java. It is a set of packages which includes classes and interfaces along with their resources such as property files and other static data. A module can require other modules (i.e.) it can explicitly specify that it depends on other modules. It can export packages too making them available for other modules to use.
Javascript Functions

Javascript Functions

Introduction Functions are one of the fundamental building blocks in JavaScript. Functions help modularize the code by splitting them up. All functions in JavaScript return a value. Even those that do not have a return statement. If you call a function that has no return statement, the returned value would be undefined. Returning a value explicitly, function info(){ return "Hello World"; } var a = info(); console.log(a);// Prints `Hello world` No return statement, but returns undefined anyway,
Understanding Scope and Closure in Javascript

Understanding Scope and Closure in Javascript

Introduction Scope determines the visibility of variable, functions and objects in your JavaScript code. If you forgot to declare some object and try to access it’s property, it is with the help of Scope that JavaScript knows that what you are trying to do is illegal and throws an exception. Understanding Scope is extremely important in creating error free code. Also they are building blocks in understanding advanced concepts such as Closure.
JShell - learning Java made easy

JShell - learning Java made easy

What is JShell and why it is a big deal The Java Shell or simply JShell is an interactive tool for learning the Java programming language. It has been introduced in Java 9. What this does is, we can test new features right in the command line with out a need to create a separate class. For example, to print the current system time, we can simply call the static method java.