Search This Blog

December 29, 2019

Bash CLI command to remove prefix from multiple file names in a directory

Before you run the below command from your target directory, you can set the prefix value in bash prompt like prefix=[FinanceDept].

Also If you want some confirmation before action, you can do it interactively using "-i" flag to the command below. It also helps to minimize accidental damages with the command execution.
Hope it serves you well!

October 29, 2019

Should I choose AWS CodePipeline or Jenkins?

Jenkins is a "Product". If you pick Jenkins, then you will have to figure out ways to manage the environment and infrastructure where it is deployed, just as the way you would have to manage your very own web-app deployment environment.
AWS CodePipeline is "Product as a Service". You don’t have to worry one bit about managing the environment in which the underlying product is deployed because AWS does that for you.
If I were you, I would favour CI/CD services like AWS CodePipeline over picking up Jenkins and managing its infrastructure ecosystem.
That said there are a lot of alternatives to AWS CodePipeline, that you can pick-up depending upon your mileage/bias. Some of them are listed below:
  • CircleCI used by 20k+ organisations, the notable ones being Facebook, Spotify, etc
  • TravisCI used by companies like ZenDesk, Heroku, etc
  • Atlassian’s Bamboo, the creators of Bitbucket as alternative to Github.
  • CodeShip that hasa ssome marquee brands like Splunk, CNN, AutoDesk etc using it as their CI/CD platform
Guess, you got what you wanted to know. Happy exploration!!..

Disclaimer: This was my response to a question in Quora a long while back.

September 30, 2019

Aliases Created In Terminal Not Showing Up In Tmux


I create a few aliases in terminal like below:
alias k=kubectl
source <(kubectl completion bash)
And then I open a tmux session with command: tmux.

Now inside of tmux pane, when I try using the alias and expect the behaviour of source command run in terminal, it fails! :(

Why does this happen and how do I get it right?

The context is that I end up using multiple panes in tmux and I don't want to re-peat the same set of aliases creation again and again as I open every tmux pane. Possible?

Side Note: If you don't know this, it might be another cause for your stress during your CKA/CKAD exam.

Essential Tmux for CKAD or CKA Exam

If you are preparing for CKAD or CKA exam and are new to Tmux (Terminal Multiplexer), this post will help you know everything that is essential to being productive with Vim during your exam.

Tmux is a software that is used to launch and play around with multiple terminals, all visible in a single screen for better productivity. Give it a shot to see how you can get productive. But what do you need for it? Possibly just this video tutorial titled Basic Tmux Tutorial in youtube and then this post for reference.

September 26, 2019

Essential Vim For CKAD Or CKA Exam

If you are preparing for CKAD or CKA exam and are new to Vim/Vi, this post will help you know everything that is essential to being productive with Vim during your exam.

Vim has 3 modes as  depicted in picture below:
  • In Command Mode, you do things like navigating your cursor from one point to another in your text file, or delete text or replace text or select text or things like that. When you open Vim, you will be in this mode to begin with.
  • In Insert Mode, you insert text and delete text with [backspace] key :)
  • In Execution Mode, you do things like search text in file, set tab length, set line numbers in editor and stuff like that.