Programming

Windows IoT Default Application

How to set the default application in Windows IoT on a Raspberry Pi I’ve recently finished a project which turns my Lifx lightbulbs on and off through calls to their API from a Raspberry Pi running Windows IoT. This deployed fine to the Raspberry Pi but it proved impossible to Read more…

By Shinigami, ago
Programming

NuGet Package Creation

How to create a NuGet package from a .NET Core class library I’ve built a few class libraries recently but in order to use them in other projects they need to be created as a NuGet package and uploaded. The easiest way to creat the NuGet package is to add Read more…

By Shinigami, ago
Programming

Live Chart.js Charts

I wanted to use Chart.js charts in my ASP.NET Core projects and as there didn’t seem to be anything existing that fit the bill decided to do it myself. Chart Creation There seems to be a few projects around for generating the relevant javascript for Chart.js but all the ones Read more…

By Shinigami, ago
Programming

Enabling HTTPS Rewrites

When setting up a website, even if it’s just a generic blog like this one, it’s good to encrypt traffic to and from it using SSL. Obtaining certificates If you’re hosting a site on it’s own custom domain name rather than using a free hosting provider then you’ll likely need Read more…

By Shinigami, ago
Programming

jQuery Date Picker

Although there’s a date picker present in HTML5 this won’t always work in older browsers and doesn’t look that great anyway so it’s generally better to do this via jQuery. First off add the following script tags to the head section of your page. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script> Read more…

By Shinigami, ago
Programming

SQL Stored Procedure In .NET

I generally end up forgetting how to return results from a SQL stored procedure within .NET so I figured I’d put it here for reference. public static List<Blog> GetBlogSummaries() { List<Blog> blogs = new List<Blog>(); using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["BlogDatabase"].ConnectionString)) { using (SqlCommand command = new SqlCommand("sp__get_blog_summaries")) { command.CommandType Read more…

By Shinigami, ago
Programming

ASP.NET Core Connection Strings Class

There’s various different ways to access values from appsettings.json in ASP.NET Core, one way to do this is create a corresponding settings class and map the values to it. First off, add a connection stings section to your appsettings.json file like so (where {ConnectionString} obviously equals your connection string). "ConnectionStrings": Read more…

By Shinigami, ago