Delete a remote git branch using CLI

For our day to day work it is good we can delete the branch form local and remote repositories by using cli. For this purpose git has very simple commands to use and those are: For a working illustration of above commands please refer :

Create sudo user in centos linux

I followed following steps to add a new user and later gave it sudo privilege. Use adduser command to add a new user or if you already have a user to give sudo access skip adduser. Its syntax is ‘adduser usernmae’ [root@centos-10d ~]# adduser devlab Set a password for new user using passwd command [root@centos-10d

Clear ssd cache in centos

I was adding a new user and received following error. [sss_cache] sysdb_domain_cache_connect: DB version too old [0.22], expected [0.23] for domain implicit_files!Higher version of database is expected!In order to upgrade the database, you must run SSSD.Removing cache files in /var/lib/sss/db should fix the issue, but note that removing cache files will also remove all of

Uninstall node on ubuntu

To uninstall node js from ubuntu following steps can be done. $ apt-get remove nodejs # It will remove the package $ apt-get purge nodejs # It will remove configurations $ apt-get autoremove # It will remove unused file ashu@dev:~/work/sb/frontend$ sudo apt-get remove nodejsReading package lists… DoneBuilding dependency treeReading state information… DoneThe following packages were

Virtualenv setup with python3

Project setup with virtualenv. While working with a pyhon3 project, it is better to install project based dependencies inside a project wise virtualenv created. It helps to minimise the interference of different versions of python modules into different projects.

Ubuntu screen recorder with audio- Obs-Studio

Ubuntu 20 have inbuilt recorder which we can be triggered by alt+ctrl+shift+ r But it does not record the voice to overcome the limitation I am exploring “OBS Studio” its installation steps are given at which I have used. Step 1) To check if “OpenGL” is available or not as OBS Studio needs openGL

install sklearn for python3

I ran a python3 program and got error Traceback (most recent call last):File “”, line 1, infrom sklearn.metrics.pairwise import pairwise_distancesModuleNotFoundError: No module named ‘sklearn’ It clearly says sklearn module is not available and second point to consider is I am using python3 and I have pyhton2 as well on my devbox. To sort it out,

Pip3 Install pip for python3

I have Ubuntu20 and by default if I check pip version I get it is for python2 But I want to use pip for pyhon3 and if I check pip3 I get following: Therefore I executed above command to have pip3 for python3 at my system : It displays a bit general information and asks

read N lines at a time file python

Here requirement is that, I want to process a file from row number N to row number N+X One solution might be, use itertools.islice to get the lines from the file between the given range of start and end.e.g for row no 3 to 6 : For example purpose I have take a file with