Nyami’s Blog

Something interesting for sure…

Dotnet Sln Add

| Comments

It’s been a while since I’d created a number dotnet projects and supporting solution using the command line so I had to refer to the documentation to keep me right. As I had just created a number of projects adding each one to the solution is a little tedious so when I’d spotted I could use globbing patterns) I thought this would save time and a few key presses.

Simple Ping Middleware

| Comments

If you find yourself needing to create a simple ping endpoint often used by load balancers as a quick check to see if traffic can be directed to your site, rather than complicating the simple and creating an MVC controller etc consider simple middleware.

Creating a Self-Signed Certificate for Identity Provider

| Comments

I’d recently had to create a self-signed certificate for use in IdentityProvider4 and was coming up against problems when using the default options with New-SelfSignedCertificate PS module.

Identity Server was throwing “CryptographicException: Invalid provider type specified” and I had ensured the user account had access so it should have been all good. After a little bit of digging it turned out the private keys were not accessible from .NET. David Christiansen’s blog post helped me track down the issue but with a little more research I ended up with the following PowerShell to create a working certificate avoiding additional steps I didnt understand ;).

Bash - I Forgot Sudo

| Comments

If you’re new to running Bash on Windows like me chances are you’ll type some huge long command only to be presented with a nice message telling you that permission was denied and then you realise you forgot “sudo”. Rather than typing the whole thing again prefixing with sudo this handy alias will save you a few keystrokes:

  • Edit bashrc (vi .bashrc)
  • Add the alias “ffs=‘sudo $(history -p !!)’”
  • Restart/open bash console

And in case you struggle with vi here is a handy cheat sheet.

RadButton Single Click

| Comments

A great and easy way to avoid the double-bounce issue and prevent getting duplicate entries etc is to use the SingleClick property of the RadButton.

<telerik:RadButton runat="server" ID="btnSend" Text="Send" OnClick="btnSend_Click" SingleClick="true" SingleClickText="Sending...">

I’ve no idea how I’ve not encountered this RadButton setting before now, saves wiring up custom OnClientClick events…

A Blog Is Reborn

| Comments

Ok, I started off with the best intention of blogging more regularly but 18 months between blog posts was not quite the cadence I was aiming for! Shortly after setting up the blog I rebuild my machine and completely failed in setting up Octopress, following my own steps in [“A Blog Is Born”] just wasn’t working, I was encountering more problems than I knew how to fix I think because most of the tools weren’t playing nicely with each other on Windows so I gave up in a huff until an easy solution came along.

TFVC and NuGet Updates

| Comments

At some point, for no obvious reason, I kept encountering an error when updating some NuGet packages, the error (TF14092) was basically telling me a file could not be modified as there was a pending delete. Experience has taught me that there is generally a reason for sudden changes in behaviour and after a little analysis I eventually worked it out.

A Blog Is Born

| Comments

So I’ve decided to start a blog, not for the first time, I’ve had a few attempts on a couple of different platforms from a custom web app to Umbraco and I’ve probably got stuff on Geeks with Blogs and Blogger too. This time I’m going for an Octopress and GitHub Pages combo and I know little of either! Thankfully both are fairly well documented and hopefully be able to learn a few things along the way.