Recently I started using the IHostedService interface for some long running jobs in my API service. Of course there are many alternatives for setting up these scheduled jobs. I followed the instructions at...
This script was created to gather a list of IP addresses from a remote server and update a firewall rule that will allow those IP addresses access to my server via Remote Desktop: Powershell script $tempFileLocation = "c:\\temp\\AllowedIpAddresses.txt" $firewallRuleName = "NAME OF FIREWALL RULE" $url =...
If you’re using Juniper VPN Network Connect client or Pulse Secure and having issues remaining connected, it can be very frustrating. Maybe you are getting disconnected every 5-10 mins? I had this issue and it took me sometime to figure out this issue. I decided to write this blog post for anyone else experiencing...
Here is a powershell script to search azure’s blob storage by file extension: Install Azure powershell See https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-6.2.1 for more information. $StorageAcctName = 'STORAGE ACCT NAME' $StorageAcctKey = 'SECURE KEY HERE' $ContainerName = 'myfiles'...
I found myself needing to connect to github via bash on windows. But I didn’t want to have to register a new public key with github. I decided to use my existing key from Windows. To do this I simply copy the file from windows to wsl. Here is the command I used, you might find it useful: cp...
If you ever need to append to your PATH variable on your system follow these instructions (Windows 10). In your windows 10 search, type “system variables”, then click “Edit the system environment variables” Click on “Environment Variables…”: In the second list, search for a variable called “Path”: Double click it and...
I recently found myself in a situation where I needed to publish my artifacts to the team city’s internal nuget feed server DURING the build (not after). In order to accomplish this I had to let Team City know about my artifacts folder (or files) during the build. I simply needed to output a message. I used Team...
I’ve been using Windows 10 for a couple months now. I have one issue and it’s very annoying. My start button no longer works. Yes, you heard that right. The start button no longer works and some other symptoms appear as well: Windows store, Edge icons disappears from the task bar. The CPU becomes extremely slow, it...
If you need to set the timezone for your azure web app, you now have an option to create an app setting. You can do this via the azure portal: Click on “Application Settings” then add a new key/value under the app settings section, for example: Key: WEBSITE\_TIME\_ZONE Value: Eastern Standard Time
Here is simple c# extension method to format your XML data. This is useful for logging xml data to trace files, etc: public static class XmlDocumentPrettyExtension { public static string Prettyify(this XmlDocument xmlDocument) { var stringWriter = new StringWriter(new StringBuilder()); var xmlTextWriter = new...