These are my personal notes from reading up on Quantum Computing. There's a great series of posts here, including a more comprehensive cheat sheet that you should probably use instead!
Using (a,b) to represent the column vector: (a)
| function Get-KeyState([uint16]$keyCode) | |
| { | |
| $signature = '[DllImport("user32.dll")]public static extern short GetKeyState(int nVirtKey);' | |
| $type = Add-Type -MemberDefinition $signature -Name User32 -Namespace GetKeyState -PassThru | |
| return [bool]($type::GetKeyState($keyCode) -band 0x80) | |
| } | |
| $VK_SHIFT = 0x10 | |
| function OutputStatus($message){ | |
| try { | |
| [Console]::SetCursorPosition(0,0) |
| {"lastUpload":"2020-06-24T08:12:00.857Z","extensionVersion":"v3.4.3"} |
| using Microsoft.ApplicationInsights.Channel; | |
| using Microsoft.ApplicationInsights.Extensibility; | |
| using System.Collections.Generic; | |
| using System.Web; | |
| namespace AppInsightsHeaders | |
| { | |
| public class HeaderTelemetryInitializer : ITelemetryInitializer | |
| { | |
| public List<string> RequestHeaders { get; set; } |
| [core] | |
| editor = code --wait | |
| [diff] | |
| tool = default-difftool | |
| [difftool "default-difftool"] | |
| cmd = code --wait --diff $LOCAL $REMOTE | |
| [alias] | |
| amendcommit = "!git commit --amend --reuse-message \"$(git rev-parse --abbrev-ref HEAD)\"" | |
| branches = branch -a --color -v | |
| wip = !git add -A && git commit -qm "WIP" |
| [reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Drawing.dll") | |
| function BytesToString($bytes) { | |
| return [System.Text.Encoding]::ASCII.GetString($bytes) | |
| } | |
| function StringToBytes($string) { | |
| return [System.Text.Encoding]::ASCII.GetBytes($string) | |
| } | |
| function GetImageTakenDate($filename) { |
These are my personal notes from reading up on Quantum Computing. There's a great series of posts here, including a more comprehensive cheat sheet that you should probably use instead!
Using (a,b) to represent the column vector: (a)
| [group-kill {{rg}}] | |
| command = group delete -g {{rg}} --yes --no-wait | |
| [get-subscription-id] | |
| command = account show --query id -o tsv | |
| #subscriptionId=$(az get-subscription-id) | |
| [deployment-operation-summary {{rg}} {{name}}] | |
| command = group deployment operation list -g {{rg}} -n {{name}} --query "[].{operationId:operationId, state:properties.provisioningState, resourceType: properties.targetResource.resourceType, resourceName:properties.targetResource.resourceName}" |
| <# | |
| This is an update of the original script to work with the Az PowerShell module: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-1.0.0 | |
| Use this script to retrieve the resources that were deployed with a pid-[GUID] tag | |
| Select-AzSubscription before running the script - it must be run within the subscription context of the deployment | |
| The GUID and resourceGroup name of the deployment are required params | |
| #> | |
| Param( | |
| [GUID][Parameter(Mandatory=$true)]$guid, | |
| [string][Parameter(Mandatory=$true)]$resourceGroupName |
| #!/bin/bash | |
| blue="\e[1;34m" | |
| green="\e[1;32m" | |
| no_colour="\e[1;0m" | |
| PROD=$(kubectl get service api-trip-svc-prod --output=jsonpath={.spec.selector.slot}) | |
| echo -e "ProdColour: ${!PROD}$PROD$no_colour" | |
| echo |