by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
Introduction Commit smaller chunks of code often, and always commit in the present. git-commit man page: https://git-scm.com/docs/git-commit git commit takes author and committer information from the following environment variables if they are set: GIT_AUTHOR_NAME...
by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
Ask yourself these questions when you are faced with a problem: Is it really a problem? Does the problem need to be solved? Does the problem need to be solved now? Does the problem need to be solved by you/us? Can you/we break the problem into chunks and solve them?...
by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
class SomeClass: def instancemethod(self): return ‘instance method called’, self @classmethod def classmethod(cls): return ‘class method called’, cls @staticmethod def staticmethod(): return ‘static method called’ Instantiate...
by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
Sed Replace the first occurrence of a string in a file, and print the result sed ‘s/find/replace/’ filename Replace all the occurrences of a string in a file, and print the result sed ‘s/find/replace/g’ filename Replace all occurrences of an...
by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
Intro Prefixes a/ and b/ represents source and destination file paths. git diff man page: https://git-scm.com/docs/git-diff It is typical to copy the file name with double-click select and paste or ctrl/cmd+click open directly in your favorite editor. But, prefixes a/...
by Pranav Kulkarni | Nov 24, 2023 | Uncategorized
Considering cat file.json be any JSON input from a file or API response, etc. Read the whole file with JSON aware viewer jq ‘.’ file.json # OR cat file.json | jq ‘.’ The rest of the write-up assumes the file being read with cat format before...