Static File Offload with Nginx and Kestrel

AspNet Core’s Kestrel webserver is making great leaps and bounds in performance however it is still suggested to offload serving static files where possible. If you’ve set up Nginx to act as a reverse proxy which Microsoft currently suggest you should do for production, those requests are going to be handled by Nginx initially anyway, so why not get it to serve up those static files for you? Configuration Fortunately the configuration to do this is fairly easy by editing the Nginx config for your site. »

Author image

AspNet Core Identity and SQLite

Tonight I set up AspNet Core Identity to use SQLite as its backing store. SQLite is a great piece of software that is a joy to use, and rightly deserves its popularity. It seemed like a great fit for storing a small number of user details for a little app I was building. Although this stackoverflow post which I discovered after I finished getting it working does a reasonable job of explaining things I did a few steps differently. »

Author image

Software Requirements and Hindsight Bias

You know about hindsight bias, right? It’s when your mind distorts memories to bring them in line with your current thinking, or current events. If you’ve ever heard someone say they “knew it would happen all along” maybe they did, or maybe it is just hindsight bias at work. In one of the first studies published on hindsight bias researchers Fischhoff and Beyth asked students about to rate the likelyhood of 15 different possible events occurring in the then-upcoming visit of U.S. »

Author image

Test-Driving a new Kitchen Computer - or - One Weird Trick to re-vitalise your aging x86 hardware

In our household we have a ‘kitchen computer’ that sits fairly unobtrusively in our living area. Current hardware is an old and fairly down-spec’d intel NUC and it cops a beating doing ad-hoc web browsing, playing youtube videos and Spotify, and displaying and occasionally editing Office docs. Lots of great stuff it was getting on admirably with in spite of its advancing years. Unfortunately a problem arose due to the small SSD inside the NUC (60GB…aaah, those were the days) and Windows’s propensity to leave behind .msp files in C:\windows\installer\ which the general consensus of the internet seems to be you’re ill-advised to play with. »

Author image

Lessons from the Fountain

Fountain is an iconic piece of ‘art’ produced by Marcel Duchamp [1], a white porcelain urinal with the words “R. Mutt 1917” scrawled on the side. While the original was lost (most likely thrown out after the exhibition) it has been the subject of controversy and discussion ever since. A small number of replicas were made during the 1950’s and In 1964 eight replicas were created by Duchamp. In 1999, one of these replicas sold at Sotheby’s for $1.7M. »

Author image

Data-bound Tags with At.js and Knockout.js

I wanted to add an editor that supported tags to an existing web application that used knockout.js (I know, not what the cool kids are using but a full re-write just to add tags seemed ill-advised). After persevering with ProseMirror I decided it was too rich for what i wanted. All I needed was plain text + tags, not the full richness of ProseMirror. After doing a bit of investigation I found a nice little library called At.js. »

Author image

Migrating to a different blog platform

After over 5 years using DotNetBlogEngine I thought it was time to move on to something different. I was interested in a modern code-base that could run on linux. After a bit of searching around I settled on Hugo. I was initially tempted by Ghost, but wanted to try out life in the Go ecosystem for a little while, so Hugo fit the bill. Migrating Content Migrating my content was fairly straight-forward. »

Author image

Building ProseMirror

ProseMirror is another top-notch javascript library from Marijn Haverbeke, creator of CodeMirror and Eloquent Javascript author. Since ProseMirror is less mature than CodeMirror it currently doesn’t ship in a ‘built’ form, but instead as a mix-n-match set of modules (presumably as it matures it will be packaged differently). Since I’ve been out of the game a little bit with front-end development (or at least sticking with what I know) I wasn’t quite up with the tools I was going to need to compile ProseMirror. »

Author image

Proof of concept Asymmetric Encrypted Xml Trace Listener

.NET’s tracing infrastructure isn’t perfect, but it gives you access to some ‘internal’ things that it is otherwise hard to get access to (like network and WCF tracing). Sometimes the things you want to trace are sensitive in nature, and probably shouldn’t be left lying around on the file system, even on your servers. Additionally you don’t want to set up a centralised, secure, logging system, and don’t want the overhead of more network traffic for every trace write (which can be pretty verbose sometimes). »

Author image

My AWS Instance was pwn3d by eastern Europe, and all I got was this click-bait headline

This blog had been extremely quiet for several months while twitter has become my ‘go to’ vehicle for quick rants. Or so I thought, until I received 2 notices from AWS (my blog is hosted on an EC2 instance) saying that my instance had been reported for abusing the terms of service. The worst part about receiving news like this is the immediate reaction is to drop everything and dive in to investigate, however often other things supervene, and so after quickly cycling through ‘shock and denial’ and ‘pain and guilt’ I decided to turn off the instance to prevent further ‘damage’ arising from its misuse, and to fix it up at a later date. »

Author image