Posts

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 :)


https://basarat.gitbook.io/typescript/intro-1/jest

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

Running microsoft deepspeed

If you wanna run Microsoft deepspeed using docker, then try with the following command :-

sudo docker run -it --entrypoint bash deepspeed/deepspeed:latest

setting up drozer

Installing server 

create python 2.7, and then create your environment. Then install using drozer server side using :-

https://github.com/mwrlabs/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl

pip install drozer-2.4.4-py2-none-any.whl

Start emulator 

./emulator avd Pixel_2_API_27
Install the agent using

adb install drozer-agent-2.3.4.apk
adb forward tcp:31415 tcp:31415

Please goto your android emulator and then run Drozer by firing up the application and then click on "Off" (to turn it on)


Next, run

 drozer console connect


Now, we are in. To list all the command please type

"ls"

Some common command to use are :-

app.package.attacksurface

How to do something useful with it?



Trying to look for database for passwords


run scanner.provider.findurls com.android.chrome.browser

run app.provider.query content://com.google.settings/partner









Following azure best practices and naming conventins

nuget commonly used command

nuget config -set http_proxy.password= nuget config -set http_proxy="http://@proxycompletename" nuget config -set http_proxy.user=""nuget sources add -name MyPackageSource -source https://pkgs.dev.azure.com/company/nuget/v3/index.json -username username -password password