Support both Node.js and browser JS in one TypeScript file
But what if you need a TypeScript script that supports both vanilla browser JS and Node.js? What if you need to expose 10+ classes?
Convert QUnit test to Mocha / Chai
Recently I’ve been playing around with NPM. I switched my unit tests from QUnit to Mocha. This was not as straight forward as one would hope. In this blog I’ll show some example code. At the end I’ll link to a side by side comparison of the entire test project. Hopefully it helps you to convert your code. I’ll be using the Chai BDD assertion engine.
How to start Node.js app windowless in Windows
Strongly Typed Events 0.3.0 – now with Signals
Turns out that I needed an even smaller type of event: the signal. It is an event that has no data; it just fires. The Strongly Typed Events project started with the IEvent
Offline Google Authentication for MVC.Net
A while back I wanted to create an ASP.Net MVC client for Google Fit that charted my weight. It turned out that offline Google authentication wasn’t as straight forward as one would hope. This article will explain how it works using Google Fit as an example. The code is applicable to the whole Google API. In this example only one authorization is stored and used across multiple accounts.
Getting your weight from Google Fit with C#
I think Google Fit is a wonderful platform. It connects multiple devices and apps to give you insight into your fitness. I connected a Withing Smart Body Analyzer scale to the system. What I’m missing is a simple min / max weight per day graph. This blog describes how to get the weight data out of Google Fit into your C# application. You can use your own chart solution to plot a graph.
Simple Database-less Authentication for MVC.Net
There are many projects that are way too small to setup an ASP.Net membership configuration or OWIN authentication. But you still want to protect your applications by one or more accounts. What to do?
Well… there is a small – but obsolete (!!) – thing that you can try: ASP.Net Forms Authentication. While it is obsolete, it is still usable. In this article I’ll show how to implement it for MVC.Net.
Get keywords for images from the Google Cloud Vision API with C#
This blog will explain how to use C# (.Net) and Nuget to get keywords from the Google Cloud Vision API project. I will show you how to upload your images through the API and getting the keywords using the LABEL_DETECTION feature.
Rasterizing EMF files with .Net / C#
I can almost hear you think: “Why on earth would anyone use EMF?” Well… I don’t… but MS Office does! Thumbnails that are saved in MS Word documents are in the EMF format. As I struggled to do something with one, I realized that I had to convert it first to a more “easy to handle” format: PNG. Easier said than done.
Strongly Typed Events 0.2.0 – now with Simple Events
A while ago I started a GitHub project for Strongly Typed Events in TypeScript. I’ve uploaded the second version (0.2) with support for ISimpleEvent