Skip to main content

Posts

Showing posts with the label git

Git Bash Developer Productivity Tips

Boosting Productivity with Custom Aliases in Git Bash As a developer, efficiency and productivity are paramount. One of the lesser-known gems in Git Bash is the ability to create custom aliases, which are shortcuts for commonly used Git commands or even more complex workflows. These aliases not only save keystrokes but also streamline your workflow, making version control tasks smoother and quicker. In this article, we'll dive into the world of custom aliases, explore how to create them, and highlight their time-saving potential. What are Custom Aliases? Custom aliases in Git Bash are user-defined shortcuts for frequently used commands. These aliases can be as simple as abbreviations or even entire command sequences. They can encompass both Git-specific commands and regular shell commands. Creating Custom Aliases To create custom aliases, you need to modify your Git configuration. You can define aliases in two scopes: local (for a specific repository) global (for all reposit

Split a very large file in to chunks

Introduction Many a times we are having to deal with the very large files, be it the logs from the server like catalina.out    or any other huge sql files or csv or text files. These are some artifacts that could have been generated in the server or might contain the data. There might not have been detailed logging systems that can do a RollingFile like appender that can get the files into smaller chunks for us to use easily. In some cases these could be large data which is hard to split into multiple chunks in an export mechanism. Problem Statement When we try to open them in an editor like  Notepad / Notepad++ / VS Code , we normally run into memory issues and the application gets frozen. At times, in case of windows, we might have to go to  Task Manager  , find the application and then  End Task  so that we can use the other apps or to allow that particular application to be usage Solution In this post, we explore on using git bash a tool. We normally use a git bash command line in

How to setup GPG keys in windows and configure the public key in github

GPG In this post today, we are going to look into the steps that we need to follow to generate and use a gpg  key with github Below given are the steps Installation Install  GnuPG for windows Validation of Installation Run the below command to verify if gpg is installed and working fine gpg --version Generate GPG key gpg --full-generate-key Running the above command will start running a command line wizard or sequence of steps, Choose the right length of the key Provide your username and email address Also provide a comment (Optional) Once done, approve with "O" Then the system will prompt for Key phrase, which will be used to secure the keys, so please remember and provide a secure value Listing the key List the keys that were generated as a result of the previous command using the below command gpg --list-secret-keys --keyid-format=long This command will produce a similar output gpg --list-secret-keys --keyid-format=long -------------------------------- pub   2048R/35F5FFB2

Using Hashicorp Vault

Why a Vault? The reason for having a vault is to have the secrets for the application stored in a very "safe" / "secure" location so that only trusted clients of the Vault (Web Apps / Services etc ) can get access to the secrets. When we do not use a vault, the dev team will check-in the secrets like Database Credentials, AWS credentials etc to the source control, which leaves it open to be accessible to anyone that gets access to source code. There are a lot of Vaults out there in AWS, Azure etc, but this system is opensource and we have full control of the installation and security, which piqued my interest and hence I started exploration. Dangers of exposing Secrets In the hands of wrong person, it could be disastrous, especially if the secret has more privileges, more the depth of the damage Developers might get to try out changes with these credentials. In recent years, a colleague of mine forgot to append the where clause in the production