Bash scripting - basics
Bash version tested
BruceWayne:[~] $ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc
Linux file permissions
Permission groups
- owner - owner of the file.
- group - a group of users.
- others - basically everyone.
Digging GIT history using 'git log'
A good analogy
Sometimes while debugging/analysing a bug or issue in the code, It can be helping to review and analyse the history of changes that went into to a file/directory. While most of the times simply looking at the code may give us what we need, Sometimes it can be time consuming. Looking at past history can render a better context and makes debugging a lot faster.
More …Coding with EAFP mindset in python
EAFP principle (Easier to Ask for Forgiveness than it is to get Permission)
The EAFP is a common principle/coding style used by the python community.
It is a style in which the attributes or keys are assumed to be present and if the assumption is false, it is catched and handled in an exception. try/except
play a great role in this style. This is opposed to LBYL style(Look Before You Leap) where the programmer needs to carefully evaluate the conditions before doing something.