Create .gitignore and other hidden files on Windows

Posted in Utility

If you ever needed to create a hidden file (.)filename on Windows then you'll have noticed that it's not particularly intuitive or easy to do. By default, Windows Explorer does not allow you do this in the GUI. Why? No idea! Solution 1 One easy and fast way to create files with a prepending (.) in the name (e.g .gitignore) is to open the Command Prompt and navigate to the directory you need to create your file. Alternatively, if you're already on the desired directory in the Explorer, you can Alt+RighClick and use Open Command Prompt from the context …[read more]


Working with the Azure DocumentDB REST API Authorization headers

[DocumentDB](https://docs.microsoft.com/en-us/azure/documentdb/" target="_blank) is Azure's NoSQL offering that provides an exception service when it comes to working with non relational data. I've recently had a request to work on a project that uses DocumentDB but relies solely on the REST API to interact with the service. This is absolutely fine, since every service on Azure is built on top of a corresponding REST Api. Even the SDKs seem to be thin wrappers around the REST Api hiding away all the "ugliness" and complexity. Why did I say ugliness and …[read more]


Being a guest at the .NET Rocks podcast

2016 has been crazy! I'll blog about it near the end of the year but for now let's focus on this. I was a guest at the [.NET Rocks](http://www.dotnetrocks.com/" target="_blank) podcast. This is something that has been on my "to-do" list for some time and last week became a reality. I'm too excited and humbled to have been invited to take part at the show and talk about the amazing work we do in my team at Microsoft. But let's take it from the beginning I've been a long term fan …[read more]


Service Principals in Microsoft Azure

What is a service principal? Azure has a notion of a Service Principal which, in simple terms, is a service account. On Windows and Linux, this is equivalent to a service account. These accounts are frequently used to run a specific scheduled task, web application pool or even SQL Server service. In a cloud context, Service Principals are the new paradigm. They are great because they allow you to provision an account that only has enough permissions and scope to run a task within a predefined set of Azure resource. It is vital that you don’t use your own …[read more]


EF Core migrations with existing database schema and data

I'm currently working on an inherited .NET Core project and I'm loving the experience. I'm still using the project.json project format instead of the newer *.csproj & msbuild one. For now I'll leave it as it is but going forward I'll use the new format for subsequent ASP.NET Core projects. The project also makes use of the newest [EF Core](https://docs.microsoft.com/en-gb/ef/" target="_blank) so it's all running on the edge of the .NET technology. EF Core Code First is great but the tooling is still rough around the edges. Some things …[read more]


How to fix Bitlocker issues on Windows 10

I like shiny new things. And when you work in tech, shiny new things are easy to acquire. Just switch to the new alpha/beta channel for your favourite toolset and you're sorted. However, all this comes with a massive disclosure: things can quite frequently go horribly wrong. But I love the excitement of trying new features and I'm quite happy to overlook any broken bits. I also do my best to report back to the developers. And for a long time I managed to ride the (innovation) wave without major issues. Ok, I had to reinstall things from time …[read more]


The new Azure Management Fluent API has landed

Hello friends. Did you hear the news? Did you read the announcement? There's a new [awesome] Azure Management Fluent API for C#. The [announcement](https://azure.microsoft.com/en-us/blog/simpler-azure-management-libraries-for-net/" target="_blank) went out today and as soon as I saw it I knew I had to give it a try! But first, let's see what the team had to say about the release: One C# statement to authenticate. One statement to create a virtual machine. One statement to modify an existing virtual network, etc. No more guessing about what is required vs. optional vs. non-modifiable. And …[read more]


Working with Bash on Ubuntu on Windows 10

Yes, the title reads right. I'm talking about running [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)" target="_blank), the Unix Shell on Windows. Well, on the Ubuntu subsystem running inside the Windows 10 OS. It's a bit weird, I know. And yet so cool and forward thinking. If you need more info about how this works, you can check [this MSDN article](https://msdn.microsoft.com/en-us/commandline/wsl/about" target="_blank) that also provides links to related posts. And these people have done a great job explaining in depth how it all hangs …[read more]