Skip to content

Instantly share code, notes, and snippets.

@petevb
petevb / README.md
Last active November 13, 2019 10:18
[AzDO Delete Staging Timer] This stops Functions running its overdue timers when you deploy to a staging slot. #AzDO #Azure #FunctionsApp #YAML

Delete Timers from Storage on Deployment to a Staging Slot.

This stops Functions running its overdue timers when you deploy to a staging slot. You need to define the variables, per the comment in the yaml.

AzDO Pipeline Task showing the delete task

The task is simple:

az storage blob delete-batch --account-name $(StorageAccount) --source azure-webjobs-hosts --pattern timers/$(AppServiceName)-staging/*

@petevb
petevb / add-cert-and-hostname-to-web-apps.md
Last active January 9, 2024 19:47
Azure CLI cheatsheet

Using Azure CLI to add cert and hostname to web apps

These notes assume that you already have an app service plan running a number of sites (web apps) that ALL want the same wildcard cert.

The problem being solved was how to point a number of sites to a company domain.

The aliases (e.g. alias trainer.foo-uk.com onto CNAME pvb-live-eun-trainer-as.azurewebsites.net) MUST already be configured in DNS -- Azure will check!

First, how to get the interesting App Service Plan

@petevb
petevb / sqlserver-windows-firewall.md
Last active July 19, 2019 13:59
Connect to SQL Server through Windows firewall

try this

netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = localsubnet profile = DOMAIN

NB I tried this first

@petevb
petevb / git-faq.md
Last active July 3, 2019 08:04
[git FAQ] #windows #git #branch

delete branches no longer on remote (Windows console)

for /f "tokens=1,2,3*" %i in ('git branch -v') do @if "%k"=="[gone]" git branch -d %i

@petevb
petevb / 2019-04-24.md
Last active July 3, 2019 08:16
CivComm minutes #CivComm

Minutes of CivComm meeting, 24 April 2019

  • Present: Robert Cottrell, Peter Barnes, Val King, Rachel Woollett, Dan Cecil
  • Apologies: Pete van Blerk

Actions

  • Dan to initiate BPSS for Peter Barnes and Val King, and ask Pete van Blerk if he wants to do it.
  • Val to try to book RBL for AGM (26th June)
  • Val to ask Suzanne Brown for venue contacts for summer party
@petevb
petevb / targetprocess.md
Last active July 24, 2019 16:12
[TargetProcess filters/queries] #tp

Examples

This would get things US that need estimating (based on Feature's state):

?not Tags.Contains('OnHold') and (Feature.EntityState is 'Estimated' or Feature.EntityState is 'Defined')

However, if Calum tags them we might prefer this:

?Tags.Contains('estimate') and not (Feature.EntityState is 'Create' or Feature.EntityState is 'Initial')
@petevb
petevb / Storing-git-Credentials.md
Last active May 13, 2019 09:08 — forked from RichardBronosky/Storing-git-Credentials.md
[Storing git Credentials] #git #dev
@petevb
petevb / Run Visual Studio Code for Linux from WSL.md
Last active May 13, 2019 09:09 — forked from fedme/Run Visual Studio Code for Linux from WSL.md
[Run Visual Studio Code for Linux from WSL on Windows 10] #vscode #dev #wsl

Run Visual Studio Code for Linux from WSL

Thanks a lot to mredbishop and others for their insturctions posted here. This is just a recap of what they figured out.

This process was tested on WSL Ubuntu 18.04.

Install VcXsrv on Windows

  1. Dowload the VcXsrv installer from https://sourceforge.net/projects/vcxsrv/
  2. Install the software on Windows

Add VS Code repositories

@petevb
petevb / index.html
Created September 18, 2018 12:05
Hierarchical Config// source https://jsbin.com/gudubop
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Hierarchical Config">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@petevb
petevb / ata.json
Last active March 31, 2020 11:33
Visual Studio Code Settings Sync Gist
{
"api": {
"CredentialUserData": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/CredentialUserData",
"support": {
"chrome": {
"version_added": "60"
},
"chrome_android": {