Posts

Showing posts from January, 2018

Community TypeScript conference in Seattle

Seattle is getting its own community-driven TypeScript conference March 12, 2018. Get your tickets now. 

Curl command for Microsoft Cognitive Services product QnA Maker

This is the curl command to send QnA Maker a question and receive the answer: curl -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key:<subscriptionKey>" -X POST -d '{"question":"<question>"}' https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/<appID>/generateAnswer <subscriptionKey> found on https://www.qnamaker.ai/UserSettings <appID> found in url when view app, ?kbid=<appID> <question> question such as "How do I ...?"

Debug mocha.js with VSCode

This is my cheat sheet for debugging the mocha.js project from VSCode while adding fixes to it. This is not about how to debug ANY project that is using mocha for testing. The mocha.js repository has a build system that builds into /bin/mocha. I don't use a package.json script. I just use a launch.json mocha test configuration: { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version" : "0.2.0" , "configurations" : [ { "type" : "node" , "request" : "launch" , "name" : "Mocha Tests" , "program" : "${workspaceFolder}/bin/_mocha" , "args" : [ "--colors" , "${workspaceFolder}/test/reporters/dina.spec.js" ], "internalConsoleOptions" : "openOnSessionSta