Skip to content

Instantly share code, notes, and snippets.

jackawatts / gist:3f55cd9e80d86a6c56c08207b531fd8b
Created Nov 19, 2019
Uninstalling VSIX from the command line
View gist:3f55cd9e80d86a6c56c08207b531fd8b
Find the VSIX identifier by:
1. Renaming the VSIX to .zip
2. Opening the .manifest file
3. Copy the ID from the ID attribute
vsixinstaller /q /a /u:"<VSIX Identifier Here>"
jackawatts / Azure SQL User
Last active Nov 6, 2019
Azure SQL User Management
View Azure SQL User

Create the Login

	WITH PASSWORD = 'password'

Create the User

jackawatts / Vscode as default merge tool for git.bat
Created Jan 16, 2019
Vscode as default merge tool for git
View Vscode as default merge tool for git.bat
git config --global merge.tool vscode
git config --global mergetool.vscode.cmd "code --wait $MERGED"
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff $LOCAL $REMOTE"
jackawatts / Working with Azure AD and Graph
Last active Jan 25, 2019
Working with Azure AD and Graph API
View Working with Azure AD and Graph

Access to the GraphAPI requires an auth token best collected via ADAL.NET MSAL.NET is an alternative but it does not handle caching elegantly

Configure Azure AD to have the correct permissions

  1. Login to
  2. Azure AD
  3. Visit the app registration
  4. Settings => Required Permissions
  5. Add Graph API if it does not already appear in the list
  6. Add the appropriate permissions (as an app typically)
jackawatts / Add an Azure Resource Manager service
Last active Apr 1, 2020
Adding an Azure Resource Manager Service Connection in AzureDevOps
View Add an Azure Resource Manager service

Taken from:

AzureDevOpsAR is simply the name of the app registration AzureDevOps will be associated with, don't like the name? Simply change the references below.

  1. Create an App Registration to act as a Service Principal:
    1. Log in to
    2. Azure Active Directory => App Registrations => New Application Registration
    3. Name: AzureDevOpsAR, Type: Web app/API, Url: http://azuredevopsar (Url isn't important as it won't be used)
    4. Copy the Application ID as this will be the Service principal client ID
    5. Settings => Keys => Add
View Local
View Mobile Friendly Web
  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
jackawatts / TestDbSet.cs
Last active Jul 16, 2018
TestDbSet for Entity Framework 6.0
View TestDbSet.cs
namespace Data
public class TestDbSet<TEntity> : DbSet<TEntity>, IQueryable, IEnumerable<TEntity>, IDbAsyncEnumerable<TEntity>
where TEntity : class
ObservableCollection<TEntity> _data;
IQueryable _query;
public TestDbSet()
jackawatts / Sonarqube Quickstart for
Last active Jul 17, 2018
Getting up and running with Sonarqube
View Sonarqube Quickstart for
  1. Install Java Runtime Environment (
  2. Download and extract sonarqube (
  3. Launch sonarqube: C:\sonarqube\bin\windows-x86-xx\StartSonar.bat
  4. Browse to localhost:9000 to validate
  5. Install the SonarScanner for MSBuild ( Edit the SonarQube.Analysis.xml file in the directory the scanner for MSBuild was installed to:
  • Ensure the element points to localhost:9000
  • Ensure the directory the scanner was extracted to is added to:
View SQL Geography and
  • 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 ( great library for manipulating KML

  1. Load your KML: