Posts

Save Username and Password of Git Credentials in Storage

Linux To prevent the git password prompt in each git pull request can be prevented by storing the password in the local disk. To keep the credentials on disk. git config credential.helper store To enable credentials storage globally, run: git config --global credential.helper store When credentials storage is enabled, the first time you pull or push from the remote Git repository, you will be asked for a username and password, and they will be saved in ~/.git-credentials file.

Python Virtual Environment | Windows - Linux

In Windows  if you configured the PATH and PATHEXT variables for your Python installation: c:\>python -m venv c:\path\to\myenv In Linux python -m venv /path/to/new/virtual/environment https://www.geeksforgeeks.org/creating-python-virtual-environment-windows-linux/

Static site generators

List of static site generators Docusaurus https://docusaurus.io/ Material for MkDocs https://squidfunk.github.io/mkdocs-material/  MkDocs https://www.mkdocs.org/

Best loan rules - Finance

Car loan rule 20/4/10 You should be able to pay 20% of the on-road price as the down payment. The loan tenure should be for a maximum of four years. The equated monthly instalment (EMI) should not be more than 10% of the monthly income if an individual earns Rs 10 lakh per annum, the ideal budget for the vehicle would be Rs. 5 lakhs. Home rule 3/20/30/40 3 times salary 20 years loan 30% of the income emi 40% savings 24/

Use of django.contrib.humanize outside the django template

The humanize can be used in any python files in a Django project by adding the reference Eg: from django.contrib.humanize.template tags.humanize import intcomma no_of_votes = intcomma(total_votes) Ref :https://docs.djangoproject.com/en/4.0/ref/contrib/humanize/

Nginx - Compression

gzip on; gzip_static on; gzip_comp_level 6; gzip_buffers 16 8k; gzip_min_length 1000; gzip_types  application/json application/javascript application/xml application/xml+rss font/eot font/otf font/ttf image/svg+xml text/css text/javascript text/plain text/xml; Reference resource : https://www.digitalocean.com/community/tutorials/how-to-improve-website-performance-using-gzip-and-nginx-on-ubuntu-20-04

Generate dynamic Avatars

External resources to generate dynamic letter based avatars UI Avatars https://ui-avatars.com/ avatar.oxro.io Initials Avatar Generator API (oxro.io) GitHub resource: https://github.com/eddiejibson/avatars