Posts

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

PIP -- Help Guide

Get the version and details of the installed package  pip show django the sample output  Name: Django Version: 3.1.5 Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design. Home-page: https://www.djangoproject.com/ Author: Django Software Foundation Author-email: foundation@djangoproject.com License: BSD-3-Clause Location: c:\python\lib\site-packages Requires: asgiref, pytz, sqlparse Required-by: django-appconf, django-celery-email, django-haystack

Development Test Emails

 https://github.com/ChangemakerStudios/Papercut-SMTP

Useful Git Terminal Commands

Delete git local branch https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/ Switch branch using git checkout git checkout <existing_branch_name> if the branch does not exist, -b option will create a new branch for the same. git checkout -b <new_branch-name> Git pull till a particular commit git pull is nothing but git fetch followed by git merge . So what you can do is git fetch remote example_branch git merge <commit_hash> https://stackoverflow.com/questions/31462683/git-pull-till-a-particular-commit/48728993 https://www.freecodecamp.org/news/git-checkout-remote-branch-tutorial/