How to Check Temperature on Raspberry Pi
Keeping an eye on your Raspberry Pi temperature is important, especially if you are running heavy tasks like media servers, coding projects, or home automation. Overheating can cause throttling and reduce performance. Why Temperature Matters The Raspberry Pi automatically reduces CPU speed if it gets too hot, usually above 80掳C. Monitoring the temperature helps you: Prevent performance drops Avoid unexpected shutdowns Decide if you need a heatsink or fan Quick Way to Check Temperature Open the Terminal and run:...
Understanding inodes in Linux
What is inode? An inode (short for index node) is a data structure in a Linux filesystem that stores metadata about a file. Each file or directory in Linux has an inode associated with it, which contains, Inode Number Uid Gid Size Blocksize Mode Number of links ACLs, etc but it does not contain the filename, interesting right, more on that later. Inodes also stores permission bits that define how a file can be accessed:...
Exploring Crossplane #1: Introduction
(Image taken from official crossplane website) Managing infrastructure across multiple cloud providers can be complex and challenging. Enter Crossplane鈥攁 powerful, open-source Kubernetes native control plane that allows developers and platform teams to use Kubernetes to manage cloud resources like databases, storage, and networking across multiple cloud providers (AWS, GCP, Azure, etc.) and not limited to this and much more other non-cloud resources as well such as Pagerduty, Github, etc. In this introduction to Crossplane, we鈥檒l explore its core capabilities, why it鈥檚 gaining popularity, and where it鈥檚 particularly useful....
Building mkdir (linux) command in Go
One of the best way to learn language is to try recreating familiar linux command in it. In one of the previous post, we have seen how we can implement simple which command, you can check the blog post here. In this blog post, we will try to implement mkdir command, Let鈥檚 get started. mkdir is one of the important commands in Linux which helps to create directories. we will cover following in the blog post:...
Understanding iota function in Go
Iota is predefined identifier which is used in constant declaration in Go. It is used to simplify incrementing value of constants. iota value always start at 0 and increments automatically by 1 for next constant. here鈥檚 the syntax for the iota, const ( a = iota // 0 b = iota // 1 c = iota // 2 ) or you can simply write it as, const ( a = iota b c ) Let鈥檚 look at simple example,...
Refactoring Terraform easily with moved block
As Terraform codebase grows, there are chances where you may need to refactor or rename resources in your codebase which can result into deletion and recreation of resources. This happens because terraform thinks that you want to delete and create new resource and it allocates new id to the resource. Instead, you should let terraform know that you want to simply move the resource instead of replacing it. To mimic this we will take simple example where we will have AWS instance with name a and we want to change it to b...
Piping Command Output in Go
In a previous blog post, we learned how to create and run commands in Go. Now, let鈥檚 explore how to recreate the following command: ls -l | grep hello Let鈥檚 create the first command: lsCmd := exec.Command("ls", "-l") Next, create the second command: grepCmd := exec.Command("grep", "hello") To connect them, we need to understand what鈥檚 happening in the Linux command. Essentially, we are taking the stdout of the first command ls -l and passing it to the stdin of the second command grep hello....