This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# Custom Script for Windows #> | |
| ##Change to current dir | |
| $scriptpath = $MyInvocation.MyCommand.Path | |
| $dir = Split-Path $scriptpath | |
| cd $dir | |
| ##Download the server install | |
| Invoke-WebRequest http://netcologne.dl.sourceforge.net/project/jasperserver/JasperServer/JasperReports%20Server%20Community%20Edition%206.2.0/jasperreports-server-cp-6.2.0-windows-x64-installer.exe -outfile jsinstall.exe | |
| ##Install Jaspersoft Reporting community edition |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [parameter(Mandatory=$true)] | |
| [string]$Account, | |
| [parameter(Mandatory=$true)] | |
| [string]$SASToken, | |
| [parameter(Mandatory=$true)] | |
| [string]$OutputDir | |
| ) | |
| $ErrorActionPreference = "Stop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AppInsightsTelemetryInitializer : ITelemetryInitializer | |
| { | |
| public void Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) | |
| { | |
| var userId = HttpContext.Current?.User?.Identity?.GetUserId(); | |
| telemetry.Context.User.AccountId = userId; | |
| CheckAndAdd(telemetry, "UserId", userId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Threading.Tasks; | |
| using EtcdNet; | |
| using System.Linq; | |
| namespace ConsoleApplication | |
| { | |
| public class Program | |
| { | |
| private const string ElectionKey = "/MasterElection/Status"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $InstanceUrl = "https://something.documents.azure.com:443" | |
| $DatabaseName = "dbname" | |
| $AccessKey = "accesskey" | |
| #Create a signiture for docdb in powershell | |
| function Get-Signature { | |
| param( | |
| [parameter(Mandatory=$true)] | |
| [string]$verb, | |
| [parameter(Mandatory=$true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Run_PostDeployWebTest.ps1 | |
| # | |
| Param( | |
| [string][Parameter(Mandatory=$true)]$WebTestPath, | |
| [string][Parameter(Mandatory=$true)]$PublicUrl, | |
| [string][Parameter(Mandatory=$true)]$OutputDir, | |
| [string]$OutputFileName = "WebTestResult.xml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Update_TrafficManagerProfile.ps1 | |
| # | |
| # Example Usage: .\Update-TrafficManagerProfile.ps1 -TMResourceName "lawrence-scratch-www" -ResourceGroup "lawrence-scratch" -ProfileName "example1" -DisableEndpoint | |
| Param( | |
| [string][Parameter(Mandatory=$true)] $TMResourceName, | |
| [string][Parameter(Mandatory=$true)] $ResourceGroup, | |
| [string][Parameter(Mandatory=$true)] $ProfileName, | |
| [switch][parameter(ParameterSetName="enableSet")]$EnableEndpoint, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Login-AzureRmAccount | |
| Save-AzureRmProfile "$PSScriptRoot\.lgazureprofile" | |
| Get-AzureRmResourceGroupDeployment -ResourceGroupName "something" | ForEach-Object { Start- | |
| Job -ScriptBlock { | |
| param($deployment) | |
| Select-AzureRmProfile -Path "$PSScriptRoot\.lgazureprofile" | |
| $deployment | Remove-AzureRmResourceGroupDeployment | |
| } -ArgumentList $_ } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $resourceGroupName = "some-deployment-group" | |
| Login-AzureRmAccount | |
| Save-AzureRmProfile "$PSScriptRoot\.azureprofile" | |
| function Delete-History { | |
| $batch = 80 | |
| Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName | ForEach-Object { | |
| $batch = $batch -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CURRENT="khenidak/hyperkube-amd64:kv1.5" | |
| NEW="gcrio.azureedge.net/google_containers/hyperkube-amd64:v1.7.0" | |
| SEDPATTERN="s|$CURRENT|$NEW|g" | |
| sudo systemctl stop kubelet.service | |
| sudo sed -i $SEDPATTERN /etc/kubernetes/manifests/* | |
| sudo sed -i $SEDPATTERN /etc/kubernetes/addons/* | |
| sudo sed -i $SEDPATTERN /etc/default/kubelet | |
| sudo systemctl daemon-reload |