Skip to content

Instantly share code, notes, and snippets.

View mcollier's full-sized avatar
🏠
Working from home

Michael S. Collier mcollier

🏠
Working from home
View GitHub Profile
$subscriptionId = "---- ADD YOUR AZURE SUBSCRIPTION ID ----"
$tennantId = "---- ADD YOUR AZURE AD TENANT ID ----"
# Password for the service principal
$secret = "test!12345678910"
$secureStringPassword = ConvertTo-SecureString -String $secret -AsPlainText -Force
# $resource = "https://management.azure.com/"
$resource = "https://management.core.windows.net/"
while ( ! (find /var/log/azure/Microsoft.Azure.Diagnostics.LinuxDiagnostic/*/extension.log | xargs grep "Start mdsd"));
do
echo "sleeping for 5"
sleep 5
done
echo "updating apt pkgs"
sudo apt-get -y update
echo "installing openjdk9"
#!/bin/sh
echo "installing packages"
until apt-get -y update && apt-get install -y aptdcon
do
sleep 2
done
yes | aptdcon --hide-terminal --refresh
#!/bin/sh
echo "installing packages"
until apt-get -y update && apt-get install -y openjdk-9-jre
do
echo "try again"
sleep 2
done
@mcollier
mcollier / conference_downloads.ps1
Last active December 8, 2021 10:12
Download videos and slides from Microsoft conferences
Param
(
[Parameter(Mandatory=$false)]
[String]
$DownloadLocation
)
cls
# The script has been tested on Powershell 3.0
@mcollier
mcollier / teched_na_2013_downloads.ps1
Last active December 18, 2015 07:49 — forked from erichexter/download.ps1
Download videos and slides from TechEd NA 2013.
cls
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$rss = (new-object net.webclient)
#Set the username for windows auth proxy
#$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials
# TechEd NA 2013
#$dataFeed = "http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/rss/mp4high/?sort=sequential&direction=desc&term=&r=Developer+Tools+%26+Application+Lifecycle+Management&r=Windows+Azure+Application+Development&y=Breakout&Media=true#fbid=FDnmapgI5Hf"
@mcollier
mcollier / BuildAndDeploy.ps1
Created April 4, 2013 11:19
This is a sample script to (1) invoke the build and package create process for a Windows Azure Cloud Service project, and (2) invoke the AzurePublish.ps1 script to publish the Cloud Service project to Windows Azure.
$Error.Clear()
$BuildConfiguration = 'Debug'
Write-Host "*** Starting to build the project ***"
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe c:\Projects\MyApp\MyApp.ccproj `
/p:Configuration=$BuildConfiguration `
/t:CorePublish
if ($LASTEXITCODE -ne 0)
@mcollier
mcollier / AzurePublish.ps1
Created April 4, 2013 11:17
This is a sample PowerShell script to deploy a Windows Azure Cloud Service. This was written using the 0.6.11 version of the Windows Azure PowerShell cmdlets. This script also uses the Cerebrata Azure Management Cmdlets.
#NOTE: This script is based on the Microsoft provided guidance example at
# https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/.
Param(
[parameter(Mandatory=$true)]
$serviceName,
[parameter(Mandatory=$true)]
$storageAccountName,
[parameter(Mandatory=$true)]
$storageAccountKey,