cypress install package.json version

If you having cypress versioning issues - i.e, you have a global cypress version 5.4 but your project uses cypress 4.9, you can uninstall global version using 
npm uninstall cypress -g 
Then make sure you're in your project source directory, then install using the following command :-
npx cypress install 

azure devops multiple custom condition in yaml

In case you run into a situation whereby you need to specify multiple condition in your task / job, you can try the following command :-

condition: and(succeeded(), or(eq(variables['Build.Reason'], 'PullRequest'),  eq(variables['Build.SourceBranch'], 'refs/heads/master')))

git log to see only changes in your branch

If you want to see only changes in your current git branch, use the following command :-git log master..
Otherwise, to specify your target branch git log master..<your branch name>

Setting up containerized azure pipeline agents into Azure Devops

This is a tutorial for setting up build agents in Azure Devops. Lets say you would like to add more build agents, there's a couple of ways to do it. You can add vm scale set or you can use docker. This tutorial is about using microsoft pipeline agent image to add an agent to your Azure Devops pipeline build process. The setup is pretty easy, all you need is to generate your PAT token. You need to have AGENT READ-WRITE SCOPE. Run docker command sudo docker run \  -e VSTS_ACCOUNT=cdiwi \  -e VSTS_TOKEN=YOUR_PAT_TOKEN_WITH_AGENT_READWRITE \  -e VSTS_AGENT='jeremydev-agent' \  -e VSTS_WORK='/var/vsts/$VSTS_AGENT' \  -it you have your container running you should see the following outputs:- 

And if you go back to your Azure Devops pipeline and start looking for the agent name 'jeremydev-agent', you should be able to see something similar below :-

git command of the day - allow-unrelated-histories

This is a pretty handy command to blog about :)

git pull origin master --allow-unrelated-histories

Setting up jest for your node app that uses typescript :)

Here you go, proper instruction for setting up jest for your node app that uses typescript :)

moq automock sample code

Automock helps to reduce code tremendously. But it can be tricky to use at times.

Here are some simple code that you can get started with, to show it works. Sometimes those calls can get complicated and you need to know what works. The code sample below, is simple, straight forward and you won't have problem getting it to work

Enabling flake8 in vscode

In your .vscode directory, please update your settings.json file

{ "python.pythonPath": "/anaconda3/envs/myenv/bin/python", "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true, "python.linting.enabled": true }

install specific version of tensorflow

Unfortunately i have problem getting tensorflow installed on my ubuntu using pip. So i resorted to using system install and it works

pip3 install --user --upgrade tensorflow