View SqlPlus.ps1
This file contains 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
function Invoke-Scripts($server, $user, $password) { | |
"Running scripts for $user on $server" | |
pushd $user | |
$files = @(gci | where {!$_.PsIsContainer}) | |
$count = 0 | |
foreach ($file in $files) { | |
write-progress -activity "Running scripts for $user" ` | |
-currentoperation $file.name -status Executing ` | |
-PercentComplete (100*$count++/$files.count) |
View pi-gen-iot-edge-build.sh
This file contains 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
#!/bin/bash | |
# echo "$pass" | sudo -S ./build.sh | |
# echo "$pass" | sudo -S ./build.sh --clean | |
# Builds a Raspbian lite image with some customizations include default locale, username, pwd, host name, boot setup customize etc. | |
# Must be run on Debian Buster or Ubuntu Xenial and requires some "horsepower". | |
SECONDS=0 | |
clean=false |
View pi-gen-install.sh
This file contains 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
#!/bin/bash | |
# Bring system current | |
sudo apt-get update && sudo apt-get -y upgrade | |
# Install required pi-gen dependencies | |
sudo apt-get -y install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ | |
dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl bc | |
# Get pi-gen git repo |
View Dockerfile
This file contains 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
ARG QEMU="false" | |
# Stage 1 - build | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.102 AS build | |
ARG QEMU | |
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 | |
WORKDIR /build | |
COPY . . |
View Dockerfile
This file contains 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
# Global build arguments to be used in later step. Mostly metadata for labels. | |
ARG GIT_SHA | |
ARG GIT_REF | |
ARG BUILD_DATE | |
ARG BUILD_VER | |
# Stage 1 - build | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build | |
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 |
View EntityStatus.cs
This file contains 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
namespace Microsoft.Azure.Management.ServiceBus.Models | |
{ | |
/// <summary>Defines values for EntityStatus.</summary> | |
[JsonConverter(typeof (StringEnumConverter))] | |
public enum EntityStatus | |
{ | |
[EnumMember(Value = "Active")] Active, | |
[EnumMember(Value = "Disabled")] Disabled, | |
[EnumMember(Value = "Restoring")] Restoring, | |
[EnumMember(Value = "SendDisabled")] SendDisabled, |
View run-prep.ps1
This file contains 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([switch]$all, [int]$top) | |
Push-Location $PSScriptRoot | |
# Eureka takes longest. start first in new window, takes a while, lots of continual Eureka output | |
"Launching Eureka startup in another process" | |
Invoke-Expression 'cmd /c start powershell -NoProfile -Command { .\eureka-start.ps1 }' | |
"" | |
# Start Spring Cloud Config server for Producer and Consumer configuration. |
View eureka-wait.ps1
This file contains 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
$eurekaUrl = "http://localhost:8761/eureka/apps/" | |
"Checking Eureka status..." | |
$attempts = 0 | |
$maxAttempts = 20 | |
do { | |
Start-Sleep ($attempts + 2) | |
$status = -1 |
View eureka-start.ps1
This file contains 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
$eurekaLocalPath = "C:\Projects\eureka" | |
# JAVA_HOME must be set for maven build | |
# needs to be set to a JDK dir not JRE otherwise: | |
# No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? | |
$env:JAVA_HOME = "C:\Program Files\Java\jdk1.8.0_191" | |
if (!(Test-Path $eurekaLocalPath)) { | |
"Cloning Eureka" | |
git clone https://github.com/spring-cloud-samples/eureka.git $eurekaLocalPath |
View docker-restart-attempt.ps1
This file contains 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 ([switch]$wait) | |
# Note: this script isn't as reliable as actions taken right-clicking Docker Desktop tray icon and selecting Restart | |
# Can't seem to invoke that functionality or otherwise restart programmatically in same fashion that clears issues. | |
"Stopping containers" | |
docker ps -q | % { docker stop $_ } | |
docker ps -a -q | % { docker rm $_ } | |
"Starting / restarting Docker..." |
NewerOlder