SteGriff

Blog

Blog Index

What’s upblog? 🐕

This is my notebook of solved problems, thoughts, and stuff I made.

It’s a static site made with Jekyll, but it used to be powered by my home-spun system, Upblog.

All 236 posts

Use Ctrl+f to find a post by title or synopsis 😉

Resist the abolition of the human voice

Dramatic title huh. Here’s the thought: Generative AI is trained on a huge corpus of existing writing. Gen AI is used to produce prodigious amounts...

New Year New Griff

Welcome to the YEAR OF THE DRAGON 🐉. What have I been up to? There are now two Griff Kids in our house – one...

How to see the console errors of an ASP.Net Core/6+ site

During early deployments of an ASP.Net Core/6/7/8 etc. site, you might not have logging set up. Or, you might have a logging provider which your...

Langpad

At the start of this year of our Lord, 2023, I made an installable web app to store the words and phrases of Vietnamese that...

Resolving merge conflicts in git bash - some tips

Visual Studio’s libgit2 integration is really slow on my work PC, so when I need to bulk-resolve some merge conflicts, git bash is faster. These...

Keeping an ASP.Net Core/6/7/8 app alive in IIS

There are three things you have to do. First, install the ‘Application Initialization’ IIS feature on the server! This caught me out. Next, configure your...

Git - bad ref - failed to run repack

I was trying to git pull and it wouldn’t work. When I ran git gc, I got: $ git gc --aggressive --prune=now error: bad ref...

Host a static site and an API on one IIS site with sub applications

If you want a static site frontend and an API at the same domain, you can do it with IIS. Just IIS Things: IIS has...

Aggregate SQL records by date

This is Ste’s way of doing it, and if you don’t like it, well… you can email me or something. Sorry. Thanks. Say you have...

Delete a load of rows from a slow SQL table

I was trying to delete ~180,000 rows from a table and it was taking 10+ minutes so I gave up. I knew that deleting around...

How do I navigate or redirect to another page with JavaScript

A simple one, to come back from a long blogging break… To navigate to a different site in the same browser tab: document.location.href = targetUrl...

August 2023 month notes

Just some notes from last month… Coding I have been hacking on sg-login, a boilerplate full stack JS app that I can use whenever I...

Accessing getters or actions from another Vuex module

This is a cheatsheet. Say you have multiple named modules in your Vuex store and you need to access something from more than one of...

Wrap a callback-based JS library with Promises

I’ve been integrating the Microsoft Cognitive Services Text-to-speech thingy, to make a little web API that can speak Vietnamese. Take a look at this sample...

Ten years on GitHub and two years of parenthood

Last week passed two important anniversaries. I joined GitHub on this week in 2013, so I’ve been on there for ten whole years! Also, the...

Petite Vue

I’ve always liked writing little tools and apps using Vue2 as a Progressive Enhancement. For a while my workflow has been to remix at glitch.new/~ste-vue...

Refactoring JS Promises into async functions

Two key points: An async function in JS returns a promise; A promise in JS can be awaited with await instead of .then() So, a...

Azure DevOps broke IIS deployments for a week

Quick note about how Microsoft deployed a broken version (0.216.0) of the IISWebAppDeploymentOnMachineGroup task to DevOps in prod, and it broke people’s* IIS deployments for...

Adding cache-busting chunk-hashes to Vue CLI output JS

Cache-busting chunk-hashes. Chunk-busting cache-hashes. It’s almost onomatopoeic; reminiscent of a physical break-in at Mt. Gox. But no, today, we’re talking about those squirly bits that...

Move last git commit to a different branch

So you committed to main instead of your feature branch? Oops! But it’s ok. All commits in git are special little things that are easy...

I fixed my Yamaha PSS-A50

Finally writing this post after more than a year after actually fixing the thing, and two emails from friendly people following up on my initial...

Jurassic Park Lost World Dino/Jura Pet

The ‘Jurrassic Park: The Lost World “JURA PET”’ is a virtual pet by Tsukuda Original. It seems to be the only vpet they ever made....

Argentina, Varvara, Duolingo and more

Hola! I have not had energy for blogging here, or coding very much, lately. I thought I’d drop a little note on some stuff I’ve...

Run a Windows app as admin, always, using the registry

Before Windows 8 you could go into the Properties of an exe and tick “Run as administrator”. Since then, you have to use the Troubleshoot...

An 11ty blog for my NFL Fantasy league

I love fantasy football. This is my third season playing NFL fantasy, having been watching the NFL regularly since 2015 (‘All Or Nothing: Arizona Cardinals’...

My Reverse Proxy in IIS gives me 404 error pages

You have to enable the Proxy at server level, even after installing the Application Request Routing (ARR) module. Click the root server in the left...

Everything that was wrong with my Azure DevOps Pipelines

I’m making notes because DevOps is one of those things where you spend a week writing the YAML and then you forget how it works...

Is .Net imitating Node.js?

Recently .Net has had big changes inside and out. On the inside, the “my first program” in C# and .Net is a lot shorter than...

Digimons

This post feels right as a bullet point list. If you’re in a hurry you can just pick one level of bullets to read 😊...

Walking Appwrite

I saw this Appwrite hackathon on dev.to and I guess I was taken in by the big numbers or the promise of a free t-shirt,...

Life’s rich tapestory

Work/play continues on Tapestory (Tapest’ory and Tape-story are both ok with me) I’ve “finished” the second phase demo, tapestory-shapes-2 which consisted of: Refactoring into typescript...

I am making a creativity tool

I’m having a happy, busy time at work! This time last year (or thereabouts) I was in a really bad place mentally and physically. I...

Usable Wikis are Categorical not Hierarchical

When we build corporate Wikis and shared knowledge bases, it is tempting to try to neatly arrange every page into a master hierarchy, or tree:...

Installing Visual Studio 2022 and .Net 6

Quick note to anyone wondering about how to try .Net 6. You may ask, “Do I need to install the SDK individually?” – not if...

Very Alternative Search Engines

I think a lot of you already know about the usual alternatives to Google like Ecosia (the search engine that plants trees) and DuckDuckGo (the...

Miami Sunset CSS Art

Helen made this black-and-white art for our baby to look at. He’s old enough to see colours now, but newborn babies can only really see...

Eversince app

eversince is a progressive web app which lets you track + share counters that count days/weeks/months since or until your important dates! https://eversince.glitch.me I used...

Get hi-res twemoji SVGs by URL

Yo, just a quick one. If you want to get high quality renders of twitter emoji (twemoji), you can get the SVGs by codepoint with...

Fixing a Yamaha PSS-A50 that won’t switch on

Update from 2023 - I fixed it, so you can find out how to fix a Yamaha PSS-A50 using either of the last two links!...

Casio PX-5S stuck on ‘No media’ and ‘No file’ when I switch it on

Everyone’s favourite blog post genre; it’s niche troubleshooting time! 👩‍🔧 I’m about to sell a Casio Privia PX-5S. Last time I used it, I loaded...

How Kinopio helped me design and build an npm package

For a little while I’ve wanted to build an npm package using the latest typescript technology and build chain, like esbuild. But… there was a...

Suddenly getting CORS errors in a .Net web application

A call from my SPA to the .Net backend, that had been working fine, started going red in my browser DevTools. POST + Preflight |...

Web Pages with Personality

Here is my website frontpage in 2011: It features the earlier version of my SJG monogram, in a stressed concrete texture, with drop shadows galore....

Baby Griff

In March, we had a baby! He is an awesome baby. I respect his privacy and so there won’t be any public pictures or details...

Common Mistakes in English

Years ago I had a favourite website of common mistakes in English, and then I lost it. I could remember that it had a characteristic...

Angular Binding Two Controls To One Form Value

Angular! It makes some of the most complex things slightly simpler but boy oh boy, it makes the simplest things exceptionally hard. A thing you...

Detergents Follow Up

I wrote a few weeks ago about a lifestyle change designed to make my eczema easier to manage; eliminating all detergents (surfactants) from our home....

Deploying an Angular app to Netlify

When you’re deploying an Angular App on Netlify, there are a few config steps to remember. 1. Create _redirects Put a _redirects file in src,...

Copy HTML with native Clipboard API

The relatively new Clipboard API in browsers lets you load up the user’s clipboard as though they’d copied something themselves. Doing so with text or...

Eczema and Detergents

I’ve had diagnosed Eczema since I was less than a year old. It’s had phases through my life but has been on my wrists and...

Age of Mythology Board Game Helper in Angular

My second modern Angular thing. http://aom.netlify.app What is it? Age of Mythology is a 2002 video game which was also adapted into a board game...

Angular Build File Size - Dev vs Prod

When you run ng build (or ng b for short) to build an Angular project, by default the cli will build for development mode. This...

Stitch together multiple MKV videos from OBS

Shooting tutorials and demos in OBS is easy, and you can pause the recording anytime to fill dead space. But what if you stopped a...

Instantiating an extended/merged type in Typescript

Typescript lets you extend types with the & sign, creating new mutant hybrid types. I think these are called extended types, but I’m gonna call...

My First (Modern) Angular Thing

Last month I started a new job at NSG Group, having moved on from Paymentshield. I knew coming into the job that new Angular (that...

Bit packing binary in JavaScript and JSON

I like to help out on the Glitch support forum which is mostly like a more friendly StackOverflow. Recently a young person was trying to...

Scoring values from 0 to 10

(Disclaimer: I am not a mathematician) Say you need a formula that attributes a “good” price of £150 with a score of 10, and a...

Mixing and Mastering

Lately I have been making some chillhop music. I was listening to a few lofi/chillhop playlists while working from home in lockdown, and thought “I...

Headless CMS and Static CMS

In the beginning there were only static sites. You write a load of HTML. To update your website, you update your HTML and upload it...

Let’s make websites - Part 2

In Part 1, we used Glitch as an immediate way of making a basic website, and we learned some HTML/CSS. Today we’re going to use...

Let’s make websites - Part 1

Hi! It’s lockdown – time to learn a new skill! This is going to be a mini course on how to make a website with...

In IE, there is no request.responseURL

Had an issue today with users in Internet Explorer (all versions) due to a deficiency in the XHR object (Edge is fine). We were handling...

Trying Sitefinity

I’ve been on some Sitefinity training this week, I’ve only got Umbraco to contrast it with. Here are some thoughts! Umbraco doesn’t come out of...

Confusing things about web.config

When I started professional .Net development, nobody explained these app.config and web.config gotchas to me, so here we go: 1. Whichever project you’re running is...

Quarantine Update

This was originally on my ‘Now’ page but I moved it to a blog post because it’s time-related content and I decided that ‘Now’ pages...

How to change webpack settings set by vue-cli

I just tried out vue-cli to set up a Vue project from scratch. I’ve mostly worked with Vue either in an established project or by...

Get vue-router to change part of the query string without a page refresh

People use vue-router in Vue Single Page Apps (SPAs) to manage how the URL affects what you’re seeing on the page. Sometimes you want to...

Mythbusting High Fructose Corn Syrup (HFCS)

When I go to the USA, I eat sweets and drink fizzy drinks that are made with High Fructose Corn Syrup (HFCS) instead of sugar....

Dealing with CORS

Cross Origin Resource Sharing (CORS) is a security measure enforced by web browsers which affects calls made from a web browser session to a remote...

Azure Service Bus Topics in .Net Framework 4

I’ve done queue processing wrong a few times in my career. I can admit to that. I’ve made a lot of use of Azure Storage...

ASP.Net custom attributes share a DbContext and cause thread hell

Or, “How come I get errors about ‘A second operation’ starting but I’m using await right with no lazy loading?!” ASP.Net WebAPI attributes are cached...

Setting up IIS for the first time

Windows has a built-in webserver called Internet Information Services (IIS). It’s often switched off by default, but it’s easy to switch it on and use...

Array Methods in LINQ, JS, and PHP

Array methods and lambdas! JavaScript has had them since ECMAScript 2015. DotNet has them in the form of LINQ, and PHP has had some variety...

Changing the timezone on Azure App Services

For my future self: You really can’t fix Azure App Service timezone through web.config. When has web.config ever let you run an application in a...

Node Sass Release Download Not Found

I had a problem with installing and running the build task for our Vue project on my new machine. When running npm install, I had...

Learning to use Docker

Docker is a way of getting some software and all its dependencies, and running that software in a somewhat isolated environment. Images are available from...

LINQ join where second collection overrides and supplements the first

Say you have a collection of default preferences, and a collection of user preferences which overrides some of the default values but also includes some...

LINQ left join

When you write LINQ query syntax (from x in stuff) you can have as many from clauses as you like. Using this technique and the...

Managing PowerShell Modules

At time of writing, there are three different PowerShell modules for Azure. They are Azure (classic) AzureRM, and Az, the new one. You can have...

Pager Gotchas

One recurring problem I really don’t like to solve in software development is pagers. Whether it’s blog posts or API results, I’ll jump over the...

Set up Slate documentation generator on Windows in 2019

Slate is a documentation site generator which runs on Ruby via the Middleman site generator, with a JavaScript frontend. It doesn’t officially support Windows but...

Getting Enum attributes - fast!

Sometimes you want to attach extra information to Enum members so that you can get, for example, a user-facing string representation of the underlying value....

A quirky way to handle dependencies on artifacts from other solutions

Say you’ve got two big .Net solutions: Enormous legacy codebase including lots of patterned, reusable code (200 projects) Internal dependencies which cascade; i.e. WarehouseService depends...

My project depends on two different EntityFramework data layers with different versions of Entity Framework

…Get me out of here! So how can we make a .Net solution work with more than one version of Entity Framework in the mix?...

What no-one tells you about getting started with BenchmarkDotNet

BenchmarkDotNet is a package for benchmarking (timing) .Net routines. It does correctly what you would do wrong if you were trying to time code yourself...

How to use Moq

This is more of a ‘Note to Self’ article… something else I forget a lot… :) First, install the Moq Nuget package. Example which always...

WebAPI with NinjectHttpApplication the new way for 2019

There’s conflicting advice on how best to integrate Ninject with ASP.Net WebAPI. You can use NinjectWebCommon.cs with WebActivatorEx to start up your injection, or you...

Reasons a breakpoint will not be hit

1. You’re not in Debug config Build configurations other than Debug, by default, have “debugging info” turned down or off, and don’t define the DEBUG...

Scrub bin and obj

When you run Clean Project or Clean Solution in VS, it doesn’t delete everything from bin and obj; it just removes the artefacts which VS...

Add Config Transform in Visual Studio

This is a basic thing but I forget how to do it from time to time. You may want to add a Config transform (i.e....

My First PWA

A Progressive Web App is a website which you can pin to your homescreen and use offline like an app. To make a website into...

Azure API Management

I’m looking into Azure API Management (APIM) to find out how I can wrap my contemporary WCF services from the previous post. Process Make the...

WCF from scratch in 2019

I work with a (big!) layer of WCF services and I want to know more about them and how we can adapt for the future....

How to use Git behind a Symantec Threatpulse MITM proxy/firewall

In some corporate environments, you might be behind a proxy, like Symantec Threatpulse, which intercepts would-be-secure traffic(!), re-signing it before delivery with a different CA....

Mothballing a mudball (or, how I moved from custom software to Jekyll)

In 2014 I gave up on Wordpress and, in the height of my PHP-hacking phase, decided to build some custom blog software with these design...

Make an animated expanding list/accordion in Vue

I had to do a bit of research to put together all the parts for this feature, so it’s worth writing down for future reference...

Notepad++ command to open Git Bash in current directory

To set up this command, open Notepad++ and press F5 (or go to Run\Run...) Paste in the following: "C:\Program Files\Git\git-bash.exe" --cd=$(CURRENT_DIRECTORY) Now you can choose...

Updating Service Reference destroys most members in Reference.cs

If you update or add a service reference in Visual Studio and you don’t get all of the methods you were expecting, there was probably...

Intellisense in SSMS doesn’t work any more

In my last job Intellisense stopped working in SSMS and I just lived with it for years. When I came to a new office, it...

Host HTML on GitHub Pages without using git

This is a companion post for easy and free ways to host a static website. Here’s how you can use the GitHub web interface to...

Easy and free ways to host a static website

I like to tell people to keep a technical blog because it’s good for your skills, your employer, your employability, the tech sector, and the...

Windows Service starts multiple instances of out-of-process local COM Server

Here is a problem I can’t solve. I have a 32-bit client application which calls in to a third party out-of-process COM server (also 32-bit)....

Magically make an Azure AD user into a local machine admin

If you have standard Azure AD, it’s difficult to make a user into admin on their machine without making them a hardware/global admin across the...

Unit/Integration testing a project which calls an ASP.Net MVC site

In Visual Studio, running Tests does not run your Startup Projects. This is a pain if you’re integration testing, and your client program calls an...

Class Not Registered

I wrote a class which was COM-exposed and registered it using RegAsm. It was a 32-bit library on a 32-bit machine, being called by a...

How to create an Azure Active Directory Application and a Service Principal

You can use AAD Applications to add single-sign-on capabilities into your web app. Another use is to authenticate your own program code to call the...

Failure to cast an object from Azure TableOperation.Retrieve

If you use TableOperation.Retrieve in the Azure Table API, you might struggle to cast the result object into your preferred TableEntity type. In my experience,...

Set up log4net in 2018

log4net is a logging library for .Net projects, it can be a bit tricky to set up, so here are my personal notes: 1. Install...

Base64 Encode and Decode Unicode (UTF-8) strings in JavaScript and .Net

The Base64 functions in JavaScript are made for ASCII values only. MDN has an excellent code sample for making this work with what they label...

How to do a 301/302 redirect in an Azure Function App with HttpResponseMessage

Azure Function Apps’ use the HttpRequestMessage and HttpResponseMessage classes introduced with .Net Fx 4.5 (which are heavily used in .Net Core Web API projects). It...

Solve problems with using Office 365 SMTP in an Azure Web/Function App

Office 365 uses an SMTP server like any other, but we got snagged on some weird gotchas for a long time, so here’s a blog...

Paprika For All

When I first made Paprika in 2015, I wanted to give everyone access to it. I am very excited to announce that from today, anyone...

Adding LetsEncrypt to an Azure Function App using another Azure Function App

Using Let’s Encrypt has always seemed a bit daunting but I finally bit the bullet and tried it out in Azure. A guy called Simon...

The Many Microsoft Partner Centers

At Village, we’re Microsoft Partners. Occassionally I need to check in on our competencies, qualifications, benefits etc. but there are many different portals that let...

State Machine from Scratch

In most languages and frameworks, good State Machine libraries exist, like Stateless. Use them when possible. When it’s not possible, there are principles you need...

Enable ligatures and emoji in Notepad++

By default, emoji don’t work very well in Notepad++ and font ligatures don’t work at all. I have pieced together this guide from other people...

AngularJS Quick Start Examples

AngularJS is a little out of vogue now because little brother ‘Angular’ (just Angular) has taken over. However, after working with it under duress for...

Windows App Certification Kit - cannot install package because a different package with the same name is already installed

When running the ‘Windows App Ceritification Kit’, you get an error message like this: Windows cannot install package 780a2c2f-f4be-4a7d-83bf-212522026da9_1.0.0.0_neutral_~_m56gs6vrxbyza because a different package 780a2c2f-f4be-4a7d-83bf-212522026da9_1.0.0.0_x64__gf73qhakswkrp with...

My POST Body is not being received

This one trips me over all the time, lately when I’ve been triggering a HTTP POST action from Microsoft Flow. Symptoms You’ve configured a POST...

Eraser, Webroot SecureAnywhere, and Windows 10

Nasty, unintended interactions between software packages are the worst thing about software. Here’s one for the list! The short version: On Windows 10 Fall Creators...

Let’s make a NuGet Package

I wanted to make a NuGet package for Paprika.Net so I’ve documented the process here to make it easy for beginners to follow along! This...

.Net Framework, Core, and Standard

The distinction between these three concepts of .Net Framework, Core, and Standard, has long lay in a foggy corner of my brain saying “Danger! You...

Why isn’t my .Net Core Console App building an exe

Your csproj or vbproj needs to include RuntimeIdentifiers for the platforms you want to target, and then you need to use the Publish feature (not...

New-AzureStorageQueue : No queue endpoint configured

If you create an Azure Storage Account with a replication setting of ZRS (Zone Redundant Storage) then you will not have access to Queues or...

Discovering Azure Resource Types

I was inspired by a post I found by Mitch Denny, called Azure Resource Types where he describes a programmatic process for uncovering every AZure...

Non-blocking wait or sleep in Office VBA

There are a lot of ways to pause VBA execution when scripting Office and they’re nearly all bad and wrong. The ones I’ve heard, from...

VSTS Build - Access to the registry key … is denied

If you have a project which is registered for COM Interop then it will not build in Visual Studio Team Services (VSTS), complaining with an...

Migrate MSUnit tests Accessors to PrivateObjects

MSUnits tests are fussy at the best of times and don’t run in a number of popular environments, such as Travis. If you have invested...

Building Uncle Robot

Tweets by RoboUncle This is an article for my muggle friends, to describe how I built my twitter bot, uncle robot. How does it write...

Visual Studio 2017 underlining all MVC code in red even though it builds

This project builds fine, but in VS 2017 it shows a lot of errors, which is counterproductive for developers. The following is a reduced set...

Easy API testing without Postman

The big name in API testing is usually Postman. It used to be a Chrome extension and now it’s standalone, but as a Firefox user...

“The specified dimension is not valid for the current chart type” on ChartObject.Duplicate

Background We have an Excel Add-In product which builds charts (among other things). Last week (Aug 2017), the chart generator suddenly stopped working in Office...

Link between Azure subscription and Azure AD

I wanted to improve on a diagram I found in the docs for Azure RBAC which provides a really clear illustration of how Azure administrative...

My First PowerShell

A guide to the bits that I needed when starting to use PowerShell, particularly in the context of Azure. Not a complete guide to PowerShell...

Azure Resource Templates - Crash Course

Azure resource templates are a declarative JSON file which describes a load of resources which you want to create on an Azure subscription. They are...

Authorise a group of developers to create new Azure resources

Our company Azure hosts an Azure AD which we use for Office 365 and also as the authority for who can do what in Azure...

How I write a blog post

Uhhhhh, this post is a bit meta in a silly way that I might regret but it looks like I’m going to Do it Anyway....

BuildShadowTask task failed unexpectedly after merging Test Projects

I merged two branches of a solution which each had new MSUnit test projects in them. After the merge, this build error was raised: Error...

Deploy a Custom Microsoft Teams bot in 15 minutes

You can make a ‘Custom bot’ for Microsoft Teams without having to use the full-blown Microsoft Bot Framework. The requirements are dead simple which makes...

Highlights from Microsoft Azure 20532

Maybe you read my previous post about taking the Azure 20532 course with QA. Here are my highlights from the course: 1. Web+SQL Using the...

Developing Azure Solutions course 20532 at QA

May 2017 Last week I got to go on a Microsoft Azure training course, courtesy of my employer Village Software. The course was run by...

Junior again

We’re building an extension at the moment. Dad is the brains, and my wife and I are labourers. It’s funny, every time Dad has to...

Anatomy of a building

I never realised there were so many types of brick. Building the extension has taught me a lot about what actually goes into a building,...

Switch to, merge, and push a branch in git

To switch to a branch, use checkout. It’s important that you don’t use the -b option - this creates a new branch even if it...

Jekyll Quickstart

Jekyll is a static site generator (SSG). An SSG lets you build reusable templates, and write your content in a flexible format like markdown (both...

He Carries My Burden

We are here to make much of God - to make God look great (which should be easy because he is great). Lent is a...

Tips for graduates

At Village Software, we hire a good proportion of fresh graduates. After all, everyone needs their first break to get that “3 years minimum experience”...

Tiny angular pangram app

A pangram is a sentence that contains every letter of the alphabet, like “the quick brown fox jumps over the lazy dog”. I set out...

Learning about design patterns

I’m starting to look into design patterns using a few different resources, so that I can expand my programming knowledge (not just of the patterns...

Notes on JavaScript public/private

Imagine we want to write a simulation of a House class with some private fields for storing internal information, and some public getters, setters, and...

Compiling a decompiled ASP.Net MVC website

We recently took delivery of a codebase with no code… well, it might actually turn out that the original developer comes through but I started...

Windows Forms scaling on Surface Pro

We have been working on an Office Add-in which is primarily being deployed on Surface Pro 3s and 4s. These units all have their scaling...

Keep a technical blog

About 20% of the time, when I Duck for the answer to a technical problem online, I find it on somebody’s blog. The other 80%...

Wavesurfer.js doesn’t work in Firefox 51

wavesurfer.js doesn’t play audio for me in Firefox, unless you set the backend option to MediaElement. Fault description When not working, it will draw the...

Gilbert Sackerman

Written 2017-01-23 I am very interested in the artist Gilbert Sackerman, and I’d like to find out more about him. There is not a lot...

Adding anchored, scaling UserControls to a Windows Form dynamically

In Windows Forms, you can set the Anchor property on controls so that they “anchor” themselves onto specific edges of the parent Form, so that...

Merging across seperate repositories in SVN

We have a client who has the same product in two repositories; one repository is maintained for the main site, and the other is for...

ASMX Service raises 500 error and returns binary nonsense

There are a few cases when an ASMX service in ASP.Net can return a 500 error and a load of junk binary data. Here are...

The Explorer’s guide to Las Vegas

Helen and I had the privelege of a business trip to Las Vegas recently, and as non-gamblers, we wanted to find fun things to do,...

My Synaptics Validity Sensors driver keeps reverting

My HP Pavilion laptop has a fingerprint scanner for login. The laptop shipped with Windows 7, but since 8.1 onwards, the fingerprint sensor driver keeps...

SVN merge is conflicting files unnecessarily and overwriting pertinent changes

The problem I was merging trunk changes into a branch and it was overwriting my actual work. This is unusual and not how SVN is...

The rough guide to an easy SVN merge

SVN merges can be tricky. We use TortoiseSVN here at work, as do many other .Net development places, so that will be the tool of...

Tail a file in Powershell

I had to split down a 42 billion line log file. To get the last n lines of a file using PowerShell, like Linux’ tail...

Umbraco 4 navigation menu with hidden items

Look, I don’t choose to work with Umbraco 4, but sometimes you’re maintaining a legacy system for a client and needs must. A lot of...

LINQ is generating SQL with two joins when I only want one

If you have a lot of conditions in your LINQ statement, sometimes LINQ-to-SQL does it wrong: var query = from pp in Context.ProductPrices where productCodes.Contains(pp.Product.ProductCode)...

Where are FileZilla Site Manager entries stored?

To retrieve FileZilla connection details from an old hard disk or PC, go to C:\Users\Username\AppData\Roaming\FileZilla\ and get sitemanager.xml or any other settings file you care...

Derived classes and Entity Framework Mapping

If you wanted to add extra (unmapped) data to an Entity Framework model, you might think to create a derived class to hold the extra...

Approaches to Version Control

Apart from using different technologies, different people and companies take a different approach to how they employ version control. I want to talk about a...

Outer join without an ‘on’ clause in SQL

You can do an old-style join using a comma , between table selections to perform a full outer join which has no ‘on’ clause. Say...

Setting up Native Instruments Komplete 6 for Audacity

Tags: #GriffWiki This is our family guide to setting up a Native Instruments Komplete Audio 6 soundcard with a voice recording mic. It may be...

Select items from a LINQ grouping based on multiple criteria

The data Say you have a collection of Ships Logs. var logs = new List<Log>() { new Log(){ Id = 1, ShipId = 1, Message...

Quick Reference - .Net File Open Dialog

Making a file open dialog can be a bit laborious and I always forget which fields to fill in, so here’s my current copy-pasta for...

Postman sets login cookie but my web app doesn’t

I just lost a lot of time on this one! I have a web app written in HTML/Javascript/Angular and hosted by grunt (at localhost:8000), and...

Writing .Net Events, the even shorter version

A follow up to my previous quick start for writing C# events. Let’s assume you just want to raise a simple event which can be...

Error in loading DLL - Why doesn’t my VSTO installer work?

My problem and solution I have a workbook with a significant amount of VBA code, most of which calls methods of a VSTO add-in containing...

Exposing a WebForms usercontrol as a Partial View

If you’re like me, you work with ASP.Net MVC and are used to all these new parts and the cool things they offer, but the...

Globals.ThisAddIn is null or Nothing in VSTO Automation Add-In

Scenario You’ve created a VSTO Add-In and you want to call some of the code from VBA, so you’ve followed the procedure to expose RequestComAddInAutomationService....

VBA run-time Error ‘-2147024894 (80070002)’ with VSTO

I was developing a VSTO Add-In for Excel. One day it was working and the next day it was not, and I had the following...

Get intellisense for VSTO add-in in VBA

If you’re calling VSTO code from VBA, like in this article, you may want to add a reference to your VSTO project so that you...

Excel VSTO add-in won’t show my Windows Form

You put the Windows Form in a separate project because you were trying to be a good engineer, didn’t you? Excel can’t load the dependency...

EU Referendum Opinion

I think Christians should vote for the UK to remain in the EU. What follows is a Christian rationale for remaining in the EU. Someone...

Using git with local folders

‘Git’ and ‘GitHub’ are so synonymous nowadays that you’d be forgiven for thinking you can’t have one without the other. I just realised that I...

Where are Pandoc’s default templates stored

On Windows, you can find the default templates for Pandoc in: C:\Users\{user}\AppData\Roaming\pandoc\templates So the default HTML template would be C:\Users\{user}\AppData\Roaming\pandoc\templates\default.html I initially could not find...

ISO 8601 in PHP

The one that ends in ‘Z’ To get the zoneless ISO-8601 formatted date, use this format string: date("o-m-d\Th:i:s\Z"); To get this: 2016-02-18T07:56:04Z The one with...

Embrace the case or don’t

Every few years, Microsoft refreshes its core productivity software suites like Office and Visual Studio to match whatever is going on with Windows at the...

ASP.Net AJAX “Unknown web method, Parameter name: methodName”

Scenario You have some backend code in an .asmx or .aspx file to handle AJAX requests. When you call them from the frontend with a...

My CSS in 2016

1. What should CSS be? Maintainable No specificity hell. No !important. Must have rules and class names that are easy to read. Flexible CSS be...

Virtual Pets

My cool childhood When I was a kid, my parents and I used to holiday in Devon or Cornwall in our camper van. These were...

PHP errors not displaying on OVH even though display_errors = on

This happens because OVH uses an optimised PHP infrastructure known as PHP-FPM. This system does not respect php.ini files like PHP-CGI does. Instead, there are...

Notepad++ slow typing and high CPU usage

This can be caused by the function completion scanner if its character limit is set to more than 1. Symptoms Typing is slow. If you...

Using Git and GitHub in general IT

If you need version control in the office and you’re not all software developers, git can still be a good choice. If you want to...

Ignore certain files and types in GitHub Desktop

Git has a config file called .gitignore which you can use to specify files and types which should be ignored for the life of the...

Requirements Analysis, Humbled

I was listening to a great interview today featuring Suzanne and James Robertson of the Atlantic Systems Guild where they discuss “big ‘A’ Agile” versus...

BSOD when joining mobile hotspot

Whenever I join the WiFi from my phone’s Internet Sharing feature, my Windows 8.1 PC suffers a Blue Screen of Death (Kernel Panic). This is...

Managing a standard product and a personal version on GitHub

SG 2019-01-26: From 2015 until 2019, this blog ran on homebrew PHP software called Upblog, a kind of headless CMS. Now it is a static...

gitattributes error ‘ is not a valid attribute name’

You’re setting an attribute value, but you’ve put spaces around the equals sign. Just remove the spaces! Instead of: .htaccess merge = ours Consider: .htaccess...

The AGENT smartwatch

The AGENT smartwatch was an early Pebble competitor on Kickstarter. With a campaign launched in May 2013, the AGENT promised lower power consumption than its...

Why is Adobe Reader so big?

Because it has a lot of features made to let Adobe’s corporate customers get better value out of you! This post is inspired by a...

When was the database last used?

Keep having to Duck this so I thought I’d make a post. In SQL Server, to check when a database was last in use, you...

Using email addresses as LOGIN usernames on Azure SQL

If your SQL Database server is called myazureserver and your login is user@example.com, then you must supply your login as user@example.com@myazureserver. This is a modified...

Embed web pages into Powerpoint

Doing a demo? Want to include a fancy HTML5 page, maybe an interactive D3 chart? Are you technical? We’re going to host your demo on...

Publish or Web Deploy an Azure Web App with MSBuild

It’s taken me a day and half to get this working. We have a Web App project which needs to be pushed to Azure from...

Jenkins Release button disappears when security is enabled

I just installed the Active Directory plugin and set our Jenkins server to secure using it. Then, all of the ‘Release’ buttons on our projects...

The 10,000 most common passwords

These files were originally published by Mark Burnett (xato.net) on the 20th of June 2011, but it can be hard to get hold of them...

Make the MVP

MVP means Minimum Viable Product (among other things). The minimum viable product is the first build that does something useful/fun (depending on what your user...

Defined

This is a web app I made on 18th November 2014 and I forgot to talk about it until now! It’s just a dictionary, powered...

Git saves the day

I’m working on a game for a bit of fun at the moment, called Space Fleet. I’ve set aside my train commute to Liverpool, and...

AJAX ASAP

This was just a passing tweet but I want to give it another look… AJAX is sometime not Async, not JavaScript, and not XML. So...

Using CommonMark in Pandoc

If you’re doing offline publishing of Markdown to any other format under the sun, you probably are (or should be) using Pandoc. And I’ll come...

Make blogging easier

Blogging can be hard. Blogging can be easy. Here are my mental rules for making it easier: Find a workflow that you enjoy I didn’t...

CommonMark and Markdown

Markdown is the web publishing format which has exploded over the last few years. This blog engine and many, many others are powered by it....

Allow password storage in Filezilla

I turned off password saving when I set up Filezilla. Recently I got sick of having to type in FTP passwords every time, so I...

IIS Error 500.19 when web.config is fine

This article affects you if IIS is showing an HTTP 500.19 error with Error Code 0x8007000d, but your web.config file looks well formed. A special...

Quickstart a Cordova application

This guide uses the Cordova CLI, and is a condensed version of the Apache Cordova Documentation. Install any development kits you’ll need to compile for...

TortoiseSVN failed to run the WC DB work queue… access is denied.

This could happen when you attempt to ‘Upgrade Working Copy’ on a repository. I got this error while resolving problems with a Jenkins job which...

Serialize .Net objects to file and back again

When writing some progams, especially games, you might want an easy way to serialize an object with all of its properites into binary so that...

Easily crop to selection in Irfanview

I like to have Photoshop installed on my PCs if possible, but at work it isn’t. So for most of those common image editing tasks,...

Getting Started with Masonry JS

Masonry JS is a powerful library for making reactive tile layouts so that content boxes and images can shuffle themselves around your page layout to...

Bugzilla Permission Denied in IIS on Windows

You’re setting up Buzilla on Windows with IIS and get a permissions error like this whenever you try to save config values: Error in tempfile()...

Bugzilla cannot determine local time zone on Windows

If you get this error in a new Bugzilla installation on Windows: “bugzilla undef error - Cannot determine local time zone”, it could be because...

Emoji Studio

Released to Windows Phone Store on 21st April 2015, Emoji Studio is an art app that lets you place, resize, and arrange any of the...

Write your own C# events

Every other guide is too long! So this one is as much for my own reference as anyone else’s. Let’s go! We have: A class...

Save a generated value from one SQL query to use in the next query

Say you want to insert a value into Dog and then reuse some aspect of it – such as an automatically generated ID – to...

Creating an ad hoc network in Windows 8.1

On Windows 8 and 8.1, you can host a wireless network so that multiple PCs can play a LAN game or share files. Open a...

Order by GUID/UUID in SQL Server

We have some tables in MS SQL land where the ID fields are GUIDs (also known as UUIDs), and often you want to sort by...

Javascript for each returns numbers instead of objects

You’ve made an ajax request or something and now you have some data. You want to for-each over it, but instead of objects with accessible...

SIGN

I made a little service for fun at the end of 2014. I wanted one of those scrolling LED displays, but built this instead as...

Upblog

SG 2019-01-26: From 2015 until 2019, this blog ran on homebrew PHP software called Upblog, a kind of headless CMS. Now it is a static...

How to convert a video to a different format

Sometimes you have a video on your PC which you can’t watch because it’s in the wrong format. Maybe you shot the video on an...

Umbraco: Cannot use lambda expression as argument to dynamically dispatched operation

You’re probably doing something like this: var pages = Umbraco .ContentAtRoot() .Children .OrderBy(p => p.SortOrder); But the result of ContentAtRoot() is a dynamic, and you...

Umbraco can’t publish due to MySql.Web.v20

Twice in two weeks, I’ve had the problem of not being able to Save and publish a content node in Umbraco. It saves, and appears...

XML Serialization tricks in .Net

We had some fairly complicated XML to parse here at the office yesterday. I’m going to give some examples here, but the node names have...

Mimic /usr/bin in Windows

In UNIX and Linux, you can create symlinks (shortcuts) in /usr/bin which let you run extra apps from the command line. I’ve made a few...

Coded

Coded is a Windows Phone 8 app for editing plain text documents, such as code. I wrote it to satisfy my own need for portable,...

Don’t spell check code blocks in Microsoft Word

If you’ve pasted in code with syntax highlighting Select the affected code block, and go to Review on the menu strip or ribbon. Select Language\Set...

Traverse PHP array in key order

Say you’ve got an array with numerical keys (which aren’t continuous), such as file information keyed by file modified time: //Make an array of all...