Quick Git Commands
Introduction
In this post, I will show some basic git commands.
Commands
git commit
This one of the most important commands in git, it’s used to create a commit. Using it without any flags will open the text editor, making it easy to write a detailled description of the commit.
> git commit
# Your branch is up to date with 'origin/main'.
#
# Changes to be committed:
# new file: content/posts/quick-git-commands.md
#
This is the commit's message that explains the changes briefly
This is the commit's description that explains the changes it brings.
You can write on multiple lines what was done and why it was done.
> git log
commit 4f5c8b76e880f0fe7e18f0bd1fe860c843ea12da (HEAD -> main)
Author: D14rn <49399494+D14rn@users.noreply.github.com>
Date: Sun Nov 24 17:16:02 2024 +0100
This is my commit message that explains the changes briefly
This is my commit description that explains the changes made
I can write in multiple lines what I did and why I did it
git commit –amend
This one is useful whenever you realize you made a (small) mistake after creating a commit, it enables you to add staged files to the previous commit, but also enables you to simply modify the commit’s message/description. This modification replaces the old commit with a new one, so be careful.
JWT: A Short Explanation
Introduction
This article aims to be a short explanation of the three parts (header, payload, signature) of a JSON Web Token, how they are generated and validated.
Anatomy Overview
A JWT consists of three parts, each delimited by a “.” (dot) like the following:header.payload.signature
Basic overview of the three parts
Header
The header of a JWT usually contains the signing algorithm that was used, the type of the token, in this case “JWT” and optionally, if signed, a “Key ID” (kid).
Social Icons in Hugo Ananke Theme
Introduction
After completing the initial setup of my blog, I wanted to add a social icon in the header/navbar. After some searching, I found this documentation on the Ananke theme’s wiki.
Why am I writing this post?
Even though there is a wiki page “explaining” how to configure social icons, I was still confused by it, so I’m writing this in case it might help someone else.
How it works
All samples in this documentation will refer to configuration in config/_default/params.toml and use the TOML format. If you have problems translating that into your configuration situation and format (JSON, YAML) please join us in the Discussion Forum.
Setting Up My Blog
Introduction
For the past few days, I’ve been working on a project where one of the features is authentication and authorization using OpenID Connect, and Keycloak is the service that was chosen to perform this role.
Today, I was trying to find some resources explaining how to use Keycloak properly, because I implemented everything and wanted to see if there were some improvements I could make. I came across this post after some research on google.