Skip to content

Instantly share code, notes, and snippets.

View larryclaman's full-sized avatar

Larry Claman larryclaman

View GitHub Profile
@larryclaman
larryclaman / devcontainer.json
Last active May 13, 2022 14:44
Universal devcontainer plus az cli
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/codespaces-linux
{
"name": "GitHub Codespaces (Default)",
"image": "mcr.microsoft.com/vscode/devcontainers/universal:latest",
// "build": {
// "dockerfile": "Dockerfile"
// },
"settings": {
"go.toolsManagement.checkForUpdates": "local",
@larryclaman
larryclaman / polling.sh
Last active September 2, 2021 15:45
Fixed polling.sh
#!/bin/bash
declare -i duration=10
declare hasUrl=""
declare endpoint
declare -i status200count=0
endpoint="https://openhack0cy6inq0poi-staging.azurewebsites.net/api/healthcheck/poi"
healthcheck() {
@larryclaman
larryclaman / bicepsubnets
Created August 19, 2021 15:44
bicep create subnets from loop
// from https://github.com/Azure/bicep/discussions/3449
var addressSpace = [
'10.144.0.0/16'
]
var subnets = [
{
name: 'api'
subnetPrefix: '10.144.0.0/24'
#!/bin/sh
usermod -aG docker azureuser
az aks install-cli
snap install helm --classic
@larryclaman
larryclaman / AKS DNS Label.md
Last active March 24, 2021 00:42
AKS DNS Labels
@larryclaman
larryclaman / dependabot-create-issue.yml
Created November 7, 2020 23:38
Create Issue when Dependabot opens PR
name: CreateDependabotIssue
on:
workflow_dispatch:
pull_request:
branches:
- master
types: [ opened, reopened]
jobs:
issue:
@larryclaman
larryclaman / LabInfo.md
Last active May 28, 2020 12:46
Instructions for Lab
@larryclaman
larryclaman / gh_issuereport.py
Created April 21, 2020 17:17 — forked from eteq/gh_issuereport.py
A script to query github and find out how many PRs and issues a project has
from __future__ import print_function
"""
This script will use PyPI to identify a release of a package, and then search
through github to get a count of all of the issues and PRs closed/merged since
that release.
Usage:
python gh_issuereport.py astropy/astropy astropy/0.3
from https://github.blog/2020-04-09-github-protips-tips-tricks-hacks-and-secrets-from-lee-reilly/
----
Sometimes it’s useful (or entertaining) to analyze a repository’s metadata and pull out metrics. Hopefully nobody’s judged on how many commits they make, but you can generate an ordered list of authors by commit count from the command line with git shortlog -sn.
$ git shortlog -sn
3164 Stanley Goldman
1549 Andreia Gaita
195 Don Okuda
191 Emil "AngryAnt" Johansen
@larryclaman
larryclaman / convert-to-spot.ps1
Created April 8, 2020 19:23
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set