https://www.gravatar.com/avatar/fe790a554d42a68965e6169b658eb9ec?s=240&d=mp

Bind Ctrl + HJKL to arrow keys on a Mac Machine

What this post covers? So instead of reaching to arrow keys, you can just use h (as left arrow), j (as down arrow) k (as up arrow) and l (as right arrow) by hoding ctrl key. Before we start First things first, we need to install a free tool called Hammerspoon. This tool will allow us to configure the key bindings. Keyboard Settings on Mac Navigate to System Settings > Keyboard > Keyboard Shortcut > Modifier Keys (left pane).

Adding Password Protection To A Hugo Post

In this post, I’ll show you the simplest way to protect a Hugo page with a password by using front matter and adding a new parameter called “password.” This allows you to set a unique password for each post. proceed with caution This method lacks complete security. Anyone with basic computer knowledge can access your post or the repository and view the passwords. Therefore, it’s advisable to avoid sharing sensitive information using this approach.

Add Lunr Search to Hugo site

What’s covered in this post? Hugo ships with out search, yet I love it. However, I’ve managed to integrate lunr search that is supported by the theme Loveit I’m using on this website. With that being said, this post will cover how I integrate lurn on my website - for demo, go ahead and search for something on this website :) Install or update! Make sure you update or install before we start.

String Template in Java 21

What is String Template? String Template is a process of substituting values of variables into placeholders in a string. In the past, we relied on string concatenation to format output for print statements. System.out.println(arr[i] + " " + "From for loop"); Now this will change from Java 21 as String Template is here. String templates offer a more elegant approach by letting you embed expressions directly within the string. This improves readability and maintainability of your code.

Calculate Anual Rate Of Return In Python

Hey there! We’re going to work on a challenge together where we’ll be writing a program called invest.py. The goal of this program is to track the growing amount of an investment over time. We’ll start with an initial deposit, also known as the principal amount. Each year, this amount will increase by a fixed percentage called the annual rate of return. For instance, if we start with a principal amount of $100 and an annual rate of return of 5%, the first year’s increase will be $5.