
Javascript
Useful JS Cheat Sheet
1. Array Methods 1: [1, 2, 3].length; // 3 [1, 2, 3].push(4); // [1, 2, 3, 4] [1, 2, 3].unshift(0); // [0, 1, 2, 3] [1, 2, 3].pop(); // [1, 2] [1, 2, 3].shift(); // [2, 3] [1, 2, 3].at(2); // 3 [1, 2, 3].indexOf(3)
Javascript
1. Array Methods 1: [1, 2, 3].length; // 3 [1, 2, 3].push(4); // [1, 2, 3, 4] [1, 2, 3].unshift(0); // [0, 1, 2, 3] [1, 2, 3].pop(); // [1, 2] [1, 2, 3].shift(); // [2, 3] [1, 2, 3].at(2); // 3 [1, 2, 3].indexOf(3)
Docker
Managing Docker containers can sometimes feel overwhelming, especially when juggling multiple services. Portainer is a fantastic tool designed to simplify the process by providing an intuitive web-based interface for managing your Docker environment. In this guide, we'll walk through installing Portainer using Docker Compose on an Ubuntu system.
Ghost Blog
By default, Ghost stores any images uploaded to Ghost Admin locally to its filesystem, and delivers them via the same Ghost front-end service which delivers Ghost themes. It’s possible to replace this layer entirely using a custom storage adapter. Ghost Storage Adapter S3: This module allows you to read
Docker
Inspect container details: Provides detailed configuration and state information about the container, including network settings, mounts, and environment variables. docker inspect <container_name> Find where the volume is stored: docker volume inspect <volume_name> Check logs: Displays the log of the container. docker logs <container_
Nginx
This guide will show you how to set up Nginx as a reverse proxy using Docker Compose. The reverse proxy will route incoming requests for specific domain names to corresponding internal IP addresses and ports. Prerequisites: Before starting, ensure the following conditions are met: 1. Docker and Docker Compose are
n8n
n8n is a powerful, free, and self-hosted workflow automation tool that simplifies and automates tasks across various applications and services. It allows users to create complex workflows without needing extensive coding knowledge. Prerequisites: Before starting, ensure Docker and Docker Compose are installed and running on your Ubuntu system. * 👉 Learn how
Linux
Step 1: Install PostgreSQL Follow the steps below to install PostgreSQL on your Ubuntu system. * Add PostgreSQL Repository: First, update the package index and install the necessary packages: sudo apt update sudo apt install gnupg2 wget Second, add the PostgreSQL repository: sudo sh -c 'echo "deb http://apt.
GitHub
Git is an indispensable version control tool that streamlines collaboration and code management for developers. While graphical user interface (GUI) tools can simplify some tasks, mastering the Git command line unlocks deeper control, flexibility, and speed. Here are 20 Git command-line tricks that every developer should know to enhance their
Linux
Use the following command to view total disk space availability and usage: df -h --total Use the following command to view the size of a specific folder: du -sh <folder_name> Use the following command to list the sizes of all subfolders and ordered by size: du -hs
Linux
In this guide, I will walk through setting up SSH and XRDP on Kali Linux to allow for secure remote access from another machine. I'll cover updating your system, ensuring SSH service is running, installing and configuring XRDP for graphical remote access, and enabling access for Windows users.
Javascript
In JavaScript, there are three primary ways to create a function: Function Declaration, Function Expression, and Arrow Function. 1. Function Declaration: Example Code: function sayHello() { console.log("Hello, World!"); } Characteristics: One of the major features of function declarations are hoisted to the top of their scope. Which mean,
Javascript
To add a new property: There are four ways to add a new property to an object in JavaScript: 1. Using Dot notation: const obj = {name: "daviblog", age: 29 }; obj.job = "Programmer"; // obj = {name: "daviblog", age: 29, job: "Programmer"} 2. Using Bracket