Skip to content

Instantly share code, notes, and snippets.

Doug Finke dfinke

Block or report user

Report or block dfinke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View run.ps1
function Get-Joke {
$jokes = $(
"Did you hear about the restaurant on the moon? Great food, no atmosphere."
"What do you call a fake noodle? An Impasta."
"How many apples grow on a tree? All of them."
"Want to hear a joke about paper? Nevermind it's tearable."
"I just watched a program about beavers. It was the best dam program I've ever seen."
"Why did the coffee file a police report? It got mugged."
View ImportGitHubAction.ps1
function Get-GitHubActionType {
function Get-GitHubActionTypeName {
$null = $scanner.Scan($QUOTE)
View log.txt
Windows PowerShell transcript start
Start time: 20190331095548
Username: MAINBOX\Douglas
RunAs User: MAINBOX\Douglas
Configuration Name:
Machine: MAINBOX (Microsoft Windows NT 10.0.17134.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 12336
PSVersion: 5.1.17134.590
View octocat.yml
swagger: "2.0"
description: Octocat
title: Octocat
version: "1.0.0"
- http
basePath: /
dfinke / azxps.ps1
Created Mar 28, 2019
Wrapper for azx
View azxps.ps1
function Get-AZX {
param($name = "*")
$r = (Invoke-RestMethod "") -split "`n"
$list = $r[5..$($r.count - 5)]
$list |
ConvertFrom-Csv -Delimiter "|" -Header 'Name', 'Description' |
Where-Object {$_.Name -like $Name}
View mathrestapi.yaml
swagger: "2.0"
description: "My Math API"
title: "REST Enpoint for my Math API"
version: "1.0.0"
- https
basePath: /
dfinke / ShowValues.ps1
Last active Feb 22, 2019
$chart.DataLabel.ShowValue = $true - Shows the data labels in the chart
View ShowValues.ps1
$xlfile = "$env:TEMP\datalabels.xlsx"
rm $xlfile -ErrorAction SilentlyContinue
$data = 1..20 | % {
[PSCustomObject]@{Idx=$_; Amount=Get-Random -Minimum 10 -Maximum 100}
$excel = $data | Export-Excel -Path $xlfile -AutoNameRange -PassThru
View svg.ps1
$code = @"
Paper 100
Pen 0
Line 50 77 22 27
Line 22 27 78 27
Line 78 27 50 77
$svg = @()
dfinke /
Last active Dec 19, 2018
How do you translate these `az cli` calls into the PowerShell Az Module?
az login --service-principal --username "${SERVICE_PRINCIPAL}" --password "${SERVICE_PASS}" --tenant "${TENANT_ID}"
echo "Creating resource group ${APPID}-group"
az group create -n ${APPID}-group -l eastus
echo "Creating app service plan ${APPID}-plan"
az appservice plan create -g ${APPID}-group -n ${APPID}-plan --sku FREE
echo "Creating webapp ${APPID}"
az webapp create -g ${APPID}-group -p ${APPID}-plan -n ${APPID} --deployment-local-git
View action.log
### STARTED Deploy to Azure 15:31:22Z
Already have image (with digest):
Error response from daemon: manifest for not found
Already have image (with digest):
Sending build context to Docker daemon 3.584kB
Step 1/3 : FROM microsoft/azure-cli:2.0.47
2.0.47: Pulling from microsoft/azure-cli
ff3a5c916c92: Pulling fs layer
471170bb1257: Pulling fs layer
You can’t perform that action at this time.