A short blog to share Mac keyboard shortcuts that i use on a day to day basis for better productivity The shortcuts that i have compiled in this list are primarily for Taking Screenshot To Lock . Logout , Close Open windows Navigating between open applications Some short cuts for Safari or other web browsers … Continue reading Mac keyboard shortcuts
Author: rajeshsgr
How to read variable set as File type in gitlab-ci.yml ?
If you have created variables in gitlab CI/CD setting, here is how you can access it in your gitlab-ci pipeline. In the above example, the variable has following settings Type: File Key: DB_ACCESS_URL Value: jdbc:oracle:thin:@myoracle.db.server:1521:my_sid To access this in your pipeline , gitlab provides 2 ways echo $Key will give the file path cat $Key … Continue reading How to read variable set as File type in gitlab-ci.yml ?
How do i check logs of a docker container ?
To demonstrate this, i have a sample spring boot application which prints log every 1000 milliseconds (1 second) @RestController public class RandomLoggerResource { private static final Logger logger = LoggerFactory.getLogger(RandomLoggerResource.class); private Random random = new Random(); @Scheduled(fixedRate = 1000) public void logRandomMessage() { int randomInt = random.nextInt(); String randomMessage = "Generating a Random integer every … Continue reading How do i check logs of a docker container ?
How do you add custom response headers in a Spring Boot application?
To add custom response headers in a Spring boot application use ResponeEntity class. Set the values using HttpHeader object. Set the header object in response entity To set a response header for all the response , implement a Filter class and set the header in the ServletResponse class Code Snippet @Component public class ResFilter implements … Continue reading How do you add custom response headers in a Spring Boot application?
How do you find period or times of the day in Java ?
I accidentally stumbled upon this feature in Java and although it might not be super useful, I have encountered a few use cases to identify the time or period of the day, such as morning, afternoon, or night and this feature has helped . Starting Java 16 , the DateTimeFormatter class which is used for … Continue reading How do you find period or times of the day in Java ?
My favorite reads of 2022
This year, my reading habit wasn't as regular and consistent as I wanted it to be, but I still managed to read quite a few books. These were my favorites Phoenix Project The Phoenix Project is a business novel written by Gene Kim, Kevin Behr, and George Spafford. It is a fictional story that follows … Continue reading My favorite reads of 2022
What are the alternatives for Kubernetes ?
The alternatives can be categorized into these 4 categories Container as a Service (CaaS): Options in this category are services like AWS Fargate and Azure Container Instances. These cloud services manage the complexity of managing containers at scale and eliminates the need for managing or running Kubernetes. Managed Kubernetes services : Popular choices in this … Continue reading What are the alternatives for Kubernetes ?
What is HELM, why do you need it & what problem does it solve for Kubernetes?
Helm is a tool which helps to manage Kubernetes applications. Deploying applications to Kubernetes is not a simple task and some of the concepts and techniques for deploying and managing applications and services has a steep learning curve. To deploy a simple spring boot application with PostgreSQL backend, explained in blog we had to write … Continue reading What is HELM, why do you need it & what problem does it solve for Kubernetes?
What is .gitignore and how do i generate or write one?
gitignore file is used to specify files which should be untracked by Git. Each line of the file represents a filename, directory, or pattern. When git looks for changes in your working directory, it will automatically ignore any file that matches an entry in your .gitignore file. For example, when working for a java spring … Continue reading What is .gitignore and how do i generate or write one?
Embedding source code into powerpoint.
Embedding code snippets in power point for any presentation is a painful task , as there is no support to format the code or present it with proper indentations or the way code is shown in an editor One trick is to grab the screen shot and then paste it on powerpoint but the end … Continue reading Embedding source code into powerpoint.