Clipboard Watch Remove Accidentally Typed Passwords

Monitoring Clipboard in Golang: A Guide to Obscuring Passwords Introduction In this article, we explore creating a Go program that monitors the system clipboard, automatically substituting passwords with asterisks. Uniquely, the program leaves the last few characters (minimum 1, maximum 3) of the password visible when the password length exceeds 8 characters. Understanding Clipboard Monitoring in Go The Clipboard Package Go lacks a built-in library for clipboard operations. We use atotto/clipboard, a third-party package offering simple clipboard interfaces....

November 26, 2023 · 2 min · 348 words

Aws Opensearch as Monitoring Tool

Cross-Account Logging: Shipping AWS Lambda Logs to OpenSearch In today’s distributed systems, logging and monitoring play a crucial role in detecting anomalies and ensuring system health. AWS Lambda and OpenSearch are often paired to deliver efficient, scalable logging solutions. However, complexities can arise when these resources live in separate AWS accounts. This blog post will guide you through the process of sending AWS Lambda logs from Account A to an OpenSearch cluster in Account B using Terraform as the Infrastructure as Code (IAC) tool and GitLab for CI/CD pipelines....

July 12, 2023 · 5 min · 875 words

The Single Responsibility Principle

The Single Responsibility Principle (SRP) is a software design principle that states that a software module or component should have only one reason to change. This means that a module or component should have a single, narrowly defined responsibility and all of its features should be related to that responsibility. In Go, the SRP can be applied at both the package and the function level. At the package level, it’s important to consider what a package should be responsible for....

March 21, 2023 · 2 min · 377 words

Schedule Github Action With Cron

Cron scheduling is a useful feature in GitHub Actions that allows you to run a workflow on a schedule. This can be useful for tasks such as running tests or deploying code at regular intervals. To use cron scheduling in GitHub Actions, you will need to add a schedule key to your workflow file. The schedule key should contain a cron expression that specifies when the workflow should run. Here is an example of a workflow that runs every day at noon:...

March 12, 2023 · 2 min · 407 words

How to Delete Git Branch Locally

To delete a Git branch locally, you can use the git branch command with the -d flag, followed by the name of the branch you want to delete. For example: git branch -d branch_name This will delete the specified branch if it has already been fully merged into the current branch. If the branch has not been fully merged, you can use the -D flag instead, which will force the deletion of the branch....

March 7, 2023 · 1 min · 193 words