• Three .gitignore files for dotnet projects in git

    When setting up a new git repository in GitHub for a C# dotnet project, there doesn’t seem to be a preset .gitignore template for C# or dotnet. There actually is, but unhelpfully it’s not called what you’d expect; C#, CSharp, .net or dotnet… it’s instead name “VisualStudio” 🙄

  • Save debug info to file in Visual Studio

    When debugging time-sensitive applications, multithreaded applications or applications with components running in different processes, the act of placing a breakpoint can change (or break) the way that the application runs. In these scenarios it can be useful to fall back to the old school way of doing things - log it out.

  • Nullable object must have a value - C#

    I recently came across an error I haven’t seen before (or certainly can’t remember):

  • CLI git commands for IDE/GUI users

    Git’s super powerful, but a lot of that power is only really available in the command line interface (CLI), hidden from developers using GUI tools built into IDEs like Visual Studio. I’m a C# dev, so I live in Visual Studio. Recently I’ve been finding myself having to use git’s CLI to get things done, either more quickly or sometimes at all!

  • Appreciating accessibility - Keyboard shortcut guidelines

    You know what really sucks? Breaking bones. I’d been watching too many mountain biking videos on YouTube and after the first jump on a ride at my local bike trails, I came to realise that my enthusiasm and confidence far outweighed my skill. After over-jumping the jump, hitting a tree, flying over the bars and landing directly on my left shoulder 4 metres down the trail, I now have a broken clavicle (collar bone).

  • Throwaway: Disposable email helper in Vue.js

    I recently wrote Throwaway, a little app built in Vue.js to help generate and store throwaway email addresses.

  • A .gitignore file for Vue.js projects

    GitHub doesn’t appear to have a default .gitignore file for new Vue.js projects, so here’s what I’m currently using.

  • Getting the length of an ntext field in T-SQL (MSSQL)

    When querying the length of a string field in SQL, the normal go-to is the LEN() function. If the field you’re querying has the datatype ntext you’ll likely run into the following error:

    Argument data type ntext is invalid for argument 1 of len function.
    
  • What to do when your graphics drivers fail in Windows 10

    Keeping Windows up to date is normally a good idea. Keeps your system secure and blah, blah, blah… Not such a good idea if you have a Lenovo X1 Carbon. I dutifully installed a recent update to have my laptop restart into a black screen. Computer on and apparently at the lock screen, but no display. Tried plugging in an external monitor, but still nothing. Windows update screwed me. I needed to roll back, but how? As far as Windows was concerned the update was a success. I’ve booted properly… can’t be an issue here. After spending a while researching the problem, it looked like the touchpad or display drivers getting updated were likely the issue.

  • Midpoint Rounding Options in C#

    Decimal midpoint rounding options in C# default to To Even. This was a head scratching moment for me at first, as the way us humans have been taught to round is generally Away From Zero.

  • Getting Disqus comments to work on Jekyll

    So, I’ve finally got Disqus comments working properly on this blog.

  • Linq Aggregate vs String.Join

    A task I seem to do fairly regularly is joining id’s into a single, comma separated string. These id’s tend to come from collection of objects, so I use linq’s Select method to convert them into a collection of id strings.

  • Install node.js NPM packages globally without sudo

    I’ve been using Visual Studio Code for a while now; it’s a great, lightweight editor that has Visual Studio-esque intellisense… for javascript! In order to get the code completions for node.js, you have to install the typescript definitions. This is done through tsd, which is installed through npm (the Node Package Manager).

  • SVN externals and pre-build events

    Just solved a source control problem for a co-worker that I thought was worth sharing.

  • Using Linq in C#

    Linq syntax can be difficult to grasp when you see it for the first time, but once you wrap your head around it it’s actually quite simple. To start with you need a collection of stuff; anything that implements IEnumerable<T>, in this case an integer array.

  • C# UrlEncode and Friends

    I recently ran into a problem whilst rewriting part of an auto update DLL used for keeping internal C# applications up-to-date. I was removing dependencies that weren’t compatible with dotNET4.5. The auto updater reads an XML feed from a TeamCity continuous integration server, comparing version numbers to see if there’s a newer Release version of an application available.

  • Getting started... Jekyll and GitHub Pages

    So, I made two websites today… an ASP.NET MVC 4 site at work that monitors a backup server, displaying a report of the SVN backup status of several repositories… and this one!

This website uses cookies to ensure you get the best experience. For more details, see the privacy policy.

ACCEPT