How many times have you tried to follow good programming practices by creating well-defined, single-purposed methods and only exposing the necessary public methods outside of your library and become frustrated with attempting to write unit tests for your code? You then begin to question your decisions about which method(s) should be public and which methods should be private. Additionally, you start to wonder if 100% code coverage is truly necessary. I mean, 75% of code coverage isn’t really that bad, is it? It’s better than 10%, right?
If you scour the web for suggestions, there’s a number of less-than-optimal solutions for this problem. First, I’d like to cover some of these solutions and why they are less than ideal. Second, I’ll provide some production code that contains a private method along with how to successfully achieve 100% coverage with unit tests. The examples provided are in Node.js.
When attempting to use nslookup to query DNS zones hosted in Azure, you may receive the error message No response from server. This reason for this is because the request defaults to Azure DNS over IPv6 while your local network only supports IPv4.
Let’s look at an example.
If you’re using Visual Studio 2017’s SPA templates for Angular, no doubt you’ve wanted to add third-party libraries such as Font Awesome. You could reference these dependencies in the index.html, but it would be better for performance if they were included in the webpack bundle. If you’ve never worked with webpack before, this could initially be a little confusing. But, don’t worry as it’s actually pretty simple.
Create a pipe service called safe-url.pipe.ts and add the following:
Next, inject the pipe service in your app.module.ts:
And, in your Angular module declarations section:
Now, to use in your view:
Have you ever needed to add links into a web page that enabled a visitor to click to begin a chat or phone call with a Skype or Skype for business user? If you have the necessary plug-ins enabled in the browser, a phone number may be recognized automatically, but that can’t always be guaranteed. There are native URI’s to ensure that, if a site visitor has Skype or Skype for Business installed, a chat or phone call will be initialized.
By default, Telnet server is disabled for security purposes in favor of SSH. However, you can enable Telnet for testing purposes or for legacy scripts.
I have been hosting this blog on WP Engine for a couple of years and my experience has been fantastic. A while back, I explored moving my blog to Azure, but in order to have the same high-availability that WP Engine offered, I would be required to construct a load-balanced WordPress IaaS implementation – installing, configuring and managing the WordPress app environment and the MySQL database (VMs, load balancers, firewalls, etc.). Additionally, I could have chosen to use ClearDB as the MySQL provider. But, all in all, creating a linux-based high-availability environment would be considerably expensive.
Just recently, Microsoft released two new features in Azure – Azure Service Plan on Linux and Azure Database for MySQL Server. These two components allow me to run a full PaaS implementation of WordPress. Continue to read to learn how to install WordPress on a Microsoft Azure PaaS environment.
In this first demo post, I want to show how to create a simple website using Azure functions. This isn’t anything fancy and, more than likely, you won’t be attempting to do this in production, but it will still serve a purpose for us to get introduced to building functions. It is important to note that, when functions first became available, some people did, in fact, try to host their website(s) by using functions only. Why not? After all, they would only have to pay for the time the function actually ran. This could end up being a mere $1 or $2 each month. Microsoft got wind of this and put some mechanisms in place to prevent this sort of thing. We’re going to sidestep some of these mechanisms by hard-coding some HTTP responses. Again, this isn’t production-worthy.
So, you’ve heard about Azure Functions? Possibly read about them somewhere? Why all the fuss? What exactly are Azure Functions? Well, you’ve stopped at the right place. In this post and the next couple of posts, I’m going to talk about Azure Functions, along with their history, use cases and some tutorials. So, let’s get started.
I’ve recently had a lot of interaction with customers who have asked about Microsoft’s partnership with Citrix. More specifically, different people have asked how Citrix Cloud can be coupled with Azure in order to deploy a Citrix XenDesktop environment into Azure IaaS.
In this video, I don’t necessarily show the setup process. But, I do demonstrate a Raspberry PI 3 VDI client connecting to Citrix Cloud hosted Storefront and running XenDesktop/XenApp from a Windows Server 2016 machine in Azure. One interesting thing is seeing how responsive a YouTube video is while running on a Raspberry PI. Instead of the typical constraints imposed by the PI (e.g. processor, RAM, etc.), I’m leveraging the full resources of Windows Server while letting the VDI client simply render changes in the video to the user. The performance, I believe, is quite good – especially, when considering the possible deployment of such a device within the enterprise.
All in all, this makes for a very secure, economical VDI client.
Subscribe to receive new posts in your inbox.