Skip to content

Instantly share code, notes, and snippets.

@jackawatts
jackawatts / XmlExpando
Last active August 29, 2024 00:29
Simple XmlExpando
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Xml.Linq;
namespace Expando
{
public static class XmlExpando
{
using System;
using System.Linq;
using Conventional;
using Conventional.Conventions;
namespace ConventionTests
{
public class PropertyNamesOfTypeMustEndWith : ConventionSpecification
{
private readonly Type _type;
using Conventional;
using Conventional.Conventions;
using System;
using System.Linq;
namespace Conventions
{
public static class Convention
{
public static RequiresACorrespondingConcreteImplementationConventionSpecification InterfaceMustHaveCorrespondingConcreteType(Type[] subjects)

Deployment

  1. Dependencies: If upon uploading a package you are presented with "Failure reason: Failed to start deployment. Failure text: Package failed updates, dependency or conflict validation. (0x80073cf3)" TRY: Add the dependencies output in the Dependencies/x86 folder

This often happens as a result of uninstalling the application.

Forgetting the Remote Login

@jackawatts
jackawatts / Basic Azure VPN Setup.md
Last active November 27, 2023 15:36
Setting up a Basic, Policy-Based Site-to-site Azure VPN for *TEST* purposes

Getting started

This is some doco covering how to set-up a VPN for TESTING PURPOSES within Azure

This simple scenario will use: A Policy Bases VPN Type on a Site-to-site network using the Basic gateway SKU

This can be done via PowerShell and the Azure Portal, what follows is essentially a copy of: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal

Naming of the italicised components is up to the end user, however naming should be consistent between components

@jackawatts
jackawatts / VSTS with ASP.NET Core Build and Release.md
Last active January 22, 2018 23:56
VSTS with ASP.NET Core Build & Release (now with support for multiple agents on the same server!)
@jackawatts
jackawatts / ts-jest.md
Last active June 14, 2023 08:09
Getting started with Typescript, React and Jest

Getting Started

  1. Install:
  • jest: npm install --save-dev jest
  • ts-jest: npm install --save-dev ts-jest @types/jest
  1. Modify package.json
"jest": {
  "transform": {
 "^.+\\.tsx?$": "ts-jest"
  • WKT: Well-Known Text
  • SRID: a unique identifier for the co-ordinate system to be used defined by EPSG. All Geography types in SQl Server have an associated SRID. Geography instances with different SRIDS cannot be compared without additional transformation.

Note: SRIDS must be the same when performing opertations on multiple geography instances*

SqlGeometry is 2D while SqlGeography is 3D+. It is worth considering deafaulting to SqlGeometry simply unless 3D measuements or localised geography systems are used. Many 3rd parties provide data in 2D and it is easier to transform geometries to difference co-ordinate systems.

Converting KML to WKT

Try SharpKml (https://github.com/samcragg/sharpkml) great library for manipulating KML

  1. Load your KML:
@jackawatts
jackawatts / Sonarqube Quickstart for .NET.md
Last active July 17, 2018 23:08
Getting up and running with Sonarqube
  1. Install Java Runtime Environment (http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html)
  2. Download and extract sonarqube (https://www.sonarqube.org/downloads/)
  3. Launch sonarqube: C:\sonarqube\bin\windows-x86-xx\StartSonar.bat
  4. Browse to localhost:9000 to validate
  5. Install the SonarScanner for MSBuild (https://docs.sonarqube.org/display/SCAN/Install+the+SonarScanner+for+MSBuild) Edit the SonarQube.Analysis.xml file in the directory the scanner for MSBuild was installed to:
  • Ensure the sonar.host.url element points to localhost:9000
  • Ensure the directory the scanner was extracted to is added to:
  1. Only show important fields so that people don't have to spend more time filling out the form than they need to
  2. Top align fields so that the form is suitable for a mobile view
  3. Design for fat fingers so people aren't penalized for using a smaller device
  4. Collapse menus and dropdowns so that the form isn't harder to navigate through
  5. Use predictive text so that the user has to type less
  6. Use single inputs where possible so that they user has less fields to fill out
  7. Make submit buttons standout, have meaningful names & possibly 1/3 so it is clear what the user must do and they know how close they are to completing the section