Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / README.md
Last active March 12, 2023 21:14
[Boxstarter] From clean machine to all the things installed.
@petevb
petevb / .bash-aliases
Last active May 18, 2023 09:52
[dotfiles] copy to `%userprofile%`
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# twotime: https://www.npmjs.com/package/twotime
@petevb
petevb / AddExtensionToWindowsExplorerPreview.ps1
Last active January 13, 2020 13:03
Enable text preview pane for a given extension in Windows Explorer.
#############################################################################
# This script will enable preview for a given extension in Windows Explorer.
# Based on original by Bhargav Shukla http://www.bhargavs.com
#
# DISCLAIMER
# ==========
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
# RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#############################################################################
param (