Virtual Species

Using Visual Studio Code as the Default Git Editor

A quick guide on how to set up VSCode as the default Git editor

Visual Studio Code has quickly become a very popular lightweight text editor. This post is to see how we set it up as default editor for Git. We can use as simple as the below command_
$ git config --global core.editor "code --new-window --wait"
 TIP: We can use bellow command to use VS Code as editor for configuring git.
$ git config --global -e
I hope this post is useful in some cases!

Temperature Converter

There are three temperature scales in use today, Fahrenheit, Celsius, and Kelvin. The Fahrenheit scale was developed by the German physicist Daniel Gabriel Fahrenheit (1686-1736). He originally took as the zero of his scale the temperature of an equal ice-salt mixture and selected the values of 30 and 90 for the freezing point of water and normal body temperature, respectively; these later were revised to 32 and 96, but the final scale required an adjustment to 98.6 for the latter value. Fahrenheit temperature scale is a scale based on 32 for the freezing point of water and 212 for the boiling point of water, the interval between the two being divided into 180 parts. The conversion formula for a temperature that is expressed on the Celsius(C) scale to its Fahrenheit(F) representation is:

F = (9 / 5) * (C + 32)

Remove Local Git Branches

Sometimes we fall in need that we need to remove all the local git branches that are not on the remote. We create a pull request after finishing our tasks and merge that pull into the master, we have an option to delete that particular sub-branch at that time.

Git Branch
Once we delete that sub-branch from the server, we can run any of the following commands to remove that branch from the remote tracking branch list_
$ git remote prune origin
$ git fetch origin --prune
$ git fetch origin -p

Dog Year Calculator

Different breeds of dog age at varying speeds. Dogs age at varying speeds at different stages of their lives. "Small dogs reach skeletal and reproductive maturity sooner than larger breeds. Once they've achieved those measures of adulthood they carry on to live longer,​" says Dr. Kate Creevy, assistant professor of internal medicine at the University of Georgia. It's often said that the age of dogs can be better understood by multiplying their age, in human years, by 7. That is not very accurate since dogs reach adulthood within the first couple of years. The general calculator below is a bit more accurate. The formula has used 10.5 dog years per human year for the first 2 years, then 4 dog years per human year for each year after.

Word Counter

WordCounterForVirtualSpecies