Windows “ls” Equivalent: Find and List Files Easily

Windows Command Prompt returns the error: "'ls' is not recognized as an internal or external command, operable program or batch file"

The ls command is a go-to tool for Linux and macOS users to list files and directories. However, running the ls command in the Windows Command Prompt returns the error:

‘ls’ is not recognized as an internal or external command, operable program or batch file.

The Windows ls equivalent is the dir command, which provides similar functionality. Below, we’ll explore how to effectively use the dir command for basic listing, listing hidden files, and displaying detailed information. (more…)

MikroTik: Enabling HTTPS for WebFig & API

MikroTik supports HTTPS for WebFig and API, but it is disabled by default.

Transferring data over HTTP is not secure, even within a Local Area Network (LAN), because HTTP does not encrypt the data being transmitted. This can include sensitive information such as login credentials, configuration details, or any other data sent to or from your MikroTik router over HTTP.

If any devices on your LAN are compromised, an attacker can intercept HTTP traffic between you and your MikroTik router.

To improve security and encrypt communications with your MikroTik router, you need to enable HTTPS. This is not a straightforward process, as enabling HTTPS on MikroTik for WebFig and API requires you to manually configure and use a valid certificate.

In this post, you will learn how to generate a self-signed SSL certificate on MikroTik, enable HTTPS for WebFig and API, and disable services that use insecure HTTP. (more…)

Kubectl: Delete Context | Cluster | User

A context in Kubernetes is basically a combination of an information about clusters and users, stored in a kubeconfig file.

Every time you execute the kubectl command, you reference a context inside kubeconfig.

The kubectl config command is used to manage Kubernetes configurations, primarily by editing the kubeconfig file.

In this short note I will show how to delete a Kubernetes context, cluster or user from kubeconfig using the kubectl config command. (more…)

K8s: Spread Pods Evenly on Nodes in Different Zones/Regions

Kubernetes automatically spreads Pods for workload resources (such as Deployment, StatefulSet, etc.) across different Nodes to reduce the impact of failures.

In a multi-zone (multi-region) Kubernetes cluster it is required to ensure that Kubernetes will place the replicas of a Pod on the Nodes in different zones, to reduce the impact of zone failures.

In this note I will show how to distribute Kubernetes Pod replicas evenly on Nodes in different zones using topologySpreadConstraints. (more…)

Kubectl: Add Label to Kubernetes Node

Labels in Kubernetes are used for attaching meta tags to different resources, including nodes.

This helps to organize the nodes and allows to select specific subsets of nodes.

By adding labels to Kubernetes nodes, we can have more control over the resources that we create.

For example, we can make Kubernetes to schedule specific deployments onto nodes with the specific labels only.

In this post I will show how to get, add, overwrite and delete labels from Kubernetes nodes using the kubectl command. (more…)

MikroTik: NordVPN Setup

MikroTik routers support many VPN services, including NordVPN.

Starting from RouterOS v6.45, it is possible to establish IKEv2 secured tunnel to NordVPN servers using EAP authentication.

Learn how to set up NordVPN on your MikroTik router for enhanced privacy and security.

Follow these simple steps to safeguard your network traffic and enjoy seamless protection. (more…)

Git – Change Remote URL

When managing a Git repository, there are several scenarios where updating the remote URL becomes necessary:

  • Repository Migration: When moving the repository to a different location or hosting service, the remote URL needs updating.
  • Switching Protocols: Developers may switch from HTTPS to SSH for security or convenience.
  • Ownership Changes: If the username or ownership of the repository changes, the URL must be updated.

To update the remote URL in Git, you can use the git remote set-url command. (more…)

SSH into Home Assistant using Terminal & SSH Add-on

SSH access to Home Assistant (HA) can be useful in multiple cases:

  • To reboot HA remotely if this cannot be done through the web interface
  • To edit some configuration files
  • To debug OS-related issues – check logs, processes, network settings, etc.
  • To install or update additional packages or dependencies
  • To backup or restore HA

The easiest way to SSH into Home Assistant is by using the official Terminal & SSH add-on.

It is based on OpenSSH and allows to log into Home Assistant using a web-based Terminal or any SSH client.

This post describes how to install and configure the Terminal & SSH add-on to access Home Assistant over SSH. (more…)