Blog

Coding hacks, notes and cheatsheets for web development, web design, domaining and Linux systems administration.

Objects, Prototypes and Classes in JavaScript

JavaScript is based on a simple object-oriented programming model with objects being a fundamental part of the language. Almost everything in JavaScript is an object.

Read more
Getting DOM Elements using JavaScript

The Document Object Model (DOM) is a programming interface for HTML and XML documents created by the browser once the document is loaded.

Read more
Understanding JSON.parse() and JSON.stringify()

JSON (JavaScript Object Notation) is a lightweight, human-readable format for exchanging data.

Read more
Introduction to Maps in JavaScript

Maps are a new data structure in JavaScript that allows you to create collections of key-value pairs.

Read more
How to use Sets in JavaScript

A Set is a special type of object in ES6 that lets you create a collection of unique values. Each value appears only once in the set.

Read more
Understanding JavaScript Payment Request API

The Payment Request API is a new JavaScript API that provides a cross-browser standard to collect the payment, address, and contact information from a customer that can be used to process an order.

Read more
How to use async/await in JavaScript

Async/await is a modern way of writing asynchronous functions in JavaScript. They are built on top of promises and allow us to write asynchronous code in synchronous manners.

Read more
How to use JavaScript Fetch API

The Fetch API is a promise-based JavaScript API for making asynchronous HTTP requests in the browser similar to XMLHttpRequest (XHR).

Read more
How to use Axios in JavaScript

Axios is an open source library for making asynchronous HTTP requests to REST endpoints in the browser and Node.js.

Read more
How to use Promise.all() in JavaScript

Promises in JavaScript are one of the most popular ways of writing asynchronous functions that return a single value on completion or failure of the operation.

Read more
Introduction to JavaScript Arrow Functions

Arrow functions, introduced in ES6/ECMAScript 2015, are a syntactically compact alternative to regular ES5 functions.

Read more
Introduction to Promises in JavaScript

A promise in JavaScript is an object that may produce a single value upon completion (or failure) of an asynchronous operation.

Read more
How to reverse a string in JavaScript

Writing a function to reverse a string is one of the most frequently asked questions in a JavaScript interview especially if you are a junior software engineer.

Read more
How to capitalize the first letter of a string in JavaScript

One of the most frequently used operations with strings is to convert the first character of a string to uppercase. There are many ways to capitalize the first letter of a string in JavaScript.

Read more
Desktop Notifications using JavaScript

JavaScript Notifications API enables web pages to display messages to users on their devices across different platforms. These notifications appear even after the user has switched tabs or moved to another application.

Read more
How to replace all occurrences of a string in JavaScript

In JavaScript, we can replace all occurrences of a string in a text by using either regular expression or split() and join() methods.

Read more
Making HTTP Requests using Needle

Needle is a streamable HTTP client for making quick HTTP requests in Node.js application to consume RESTful web services, uploading and downloading streams of data etc.

Read more
Introduction to JavaScript Regular Expressions

A regular expression (also called regex or regexp) is a sequence of characters that defines a search pattern. These search patterns are usually used for text search, text search and replace, data extraction, and input validation operations.

Read more
6 ways to check if a string contains a substring in JavaScript

Checking if a string contains another string is a very common task. JavaScript provides many ways to check if a string contains a substring.

Read more
How to use cookies in Spring Boot

An HTTP Cookie (also known as web cookie, browser cookie) is a small piece of information stored by the server in the user's browser. The server sets the cookies while returning the response for a request made by the browser.

Read more
How to change default Java version on Ubuntu

If you are a Java developer, it is normal to have multiple Java versions installed on your machine to support different build environments.

Read more
Serving Static Resources in Express

To serve static resources such as images, CSS and JavaScript files, Express provides a built-in middleware express.static.

Read more
Making HTTP Requests using Axios

Axios is a popular Promised-based HTTP client for JavaScript which can be used in both browser and Node.js application for making HTTP requests.

Read more
Uploading Files in Node.js and Express

A large number of mobile apps and websites allow users to upload profile pictures and other files. Therefore, handling files upload is often required while building a REST API with Node.js & Express.

Read more
Upgrade Ubuntu 18.10 to 19.04 Disco Dingo

Ubuntu 19.04 Disco Dingo is expected to release next month in April 2019. The key features of new release include GNOME 3.32, Linux kernel 5.0, performance improvements, bug fixes, packages update, and more.

Read more
Upgrade Ubuntu 18.04 to 18.10 Cosmic Cuttlefish

Ubuntu 18.10 Cosmic Cuttlefish was released last year in October. It comes with new GNOME version 3.30, new default theme and icons, faster installation and boot with new compression algorithms, and more.

Read more
Export & Download Data as CSV File in Spring Boot

A Comma-Separated Values (CSV) file is just a simple plain text file that uses a comma as delimiter to separate values. It stores data in tabular format where each row consists of one or more fields and each column represents a specific field.

Read more
Add Deep Anchor Links to Your Blog using JavaScript

Deep anchor links, also known as jump links, are useful for allowing users to share direct links to specific parts of the article. They not only create better user experience but are also good for social media sharing and direct linking to different sections of the document.

Read more
Uploading Files in Spring Boot

Handling uploading and downloading files are very common jobs in most of the web applications. Spring Boot provides MultipartFile interface to handle HTTP multi-part requests for uploading files.

Read more
Parsing XML Response in Spring Boot

While JSON has become a popular choice for asynchronous communication, XML is still used by large number of companies for data exchange in SOAP web services.

Read more
Stripe integration with Spring Boot

Stripe is one of the most popular cloud-based payment services that allows businesses and freelancers to easily collect payments over the internet. Founded in 2011, Stripe has revolutionized the way payments are accepted online.

Read more
Data Type Conversions in Java

Unlike PHP or JavaScript, Java is a strongly typed programming language. It essentially means that each variable must be declared with a pre-defined data type which can not be changed afterwards.

Read more
Spring Boot Console Application

Sometimes, we do not need the web component of Spring Boot in our application. To create such a non-web application, the main class must implement CommandLineRunner interface and override its run() method.

Read more
Processing JSON Data in Spring Boot

JSON is a alternative to XML for interchanging messages between the servers, communicating with RESTful web services, and more.

Read more
Export PostgreSQL Table Data as JSON

JSON is a popular lightweight and human-readable format for interchanging data. There are so many open-source libraries available for almost all modern programming languages for parsing and consuming JSON data.

Read more
Spring Boot Thymeleaf Pagination

Pagination is widely used to split a large number of data entries to discrete pages, allowing users to easily toggle through data entries.

Read more
Sending Emails using Amazon SES in Node.js

Amazon SES (Simple Email Service) is a popular cloud-based service for sending transactional and marketing emails. It integrates well with all popular programming languages.

Read more
7 Ways to Make HTTP Requests in Node.js

HTTP requests are a core part of the most of the modern languages. It can be challenging for new developers to learn how to make HTTP requests to exchange data.

Read more
Upgrade Debian 8 Jessie to Debian 9 Stretch

Debian 9 Stretch comes with a significant amount of new and updated packages as well as a score of packages had been marked obsolete.

Read more
How to fix Tomcat 8 slow start issue

If you have installed Tomcat 8 on your linux server and it is taking forever to (re)start, it is not your fault.

Read more
Setup White-Label Name Servers using AWS Route 53

Each Amazon Route 53 hosted zone is associated with four name servers, known collectively as delegation set. By default, the name servers have names like ns-2048.awsdns-64.com. If you want the domain name of your name servers to be the same as the domain name of your hosted zone, for example, ns1.example.com, you can configure white-label name servers, also known as vanity name servers or private name servers.

Read more
Serverless Application with Express.js using AWS Lambda and Claudia.js

Express.js has become a go-to HTTP framework for quickly building RESTful web services in Node.js. If you are a Node.js developer or you've built an API in Node.js, it is highly likely that you used Express.js.

Read more
Spring Boot & Intellij IDEA: Auto reload Thymeleaf templates without restart

Spring Boot is fast becoming a popular choice for building standalone, Spring-based & production-ready web applications, from RESTful APIs to enterprise-scale websites. It offers out-of-the-box features to automatically configure Spring and 3rd-party libraries whenever possible.

Read more
Smooth scroll to page section with jQuery

For one page templates and websites, it is a common practice to scroll to a page section when clicking on an anchor link.

Read more
How to use Amazon SES to send transactional emails in Spring Boot

Amazon Simple Email Service (SES) is a cloud-based email sending service that allows you to add email functionality to any application. Using Amazon SES, you send transactional emails, marketing messages, or any other kind of notification emails to your customers.

Read more
🙌 Get new tutorials in your inbox