Wednesday, August 21, 2019

git push - set current branch only



Set only the current working branch to be pushed:

git config --global push.default simple


Monday, August 19, 2019

bash completion for aliases



For alias like  gv = gvim, bash completion don't work.

Following link helps to setup bash completion to work for alias too.

https://github.com/cykerway/complete-alias


It is two step process:

From the above link get bash_completion.sh and do

1. cat bash_completion.sh >> ~/.bash_completion



Now, add the below linke in ~/.bash_completion: 

2. complete -F _complete_alias gv 

Tuesday, August 13, 2019

Using escape sequence within yaml



I'll note that the key to using escape sequences within YAML, is for you to use ' to quote the line, and " inside for the args.

  - debug:
      msg: '{{ ks_iso_volume_id | regex_replace("\s", "\\x20") }}'

From: https://github.com/ansible/ansible/issues/52868#issuecomment-469287200



Note:
Actual error faced:
ERROR! Syntax Error while loading YAML.

  found unknown escape characte






Tuesday, August 6, 2019

Article on "how to be influenced by others" by Roger Schwarz



Interesting article about being influenced:

 “Are you open to being influenced on this issue? I’m asking because I want to use your time and my time efficiently. If you’re not open to being influenced, just let me know and I’ll drop it. If you’re open to being influenced, then would you be willing to tell me what would lead you to consider changing your mind? That will help me quickly focus only on the factors you consider relevant. If I don’t have any information about those factors, I’ll let you know. How does that sound?” 

https://hbr.org/2016/08/how-leaders-can-help-others-influence-them