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 | |
set -e -u -o pipefail | |
# | |
# Get the versions names for node AMIs as listed in AMI releases | |
# https://github.com/awslabs/amazon-eks-ami/releases | |
# | |
: ${CLUSTER:=${1?"Must specify cluster name"}} |
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
-- | |
-- Clean up orphaned Maintenance Plan subplans and their logs | |
-- Use this if you get a conflict error deleting a job | |
-- | |
use [msdb] | |
GO | |
delete from msdb..sysmaintplan_log | |
where plan_id not in ( |
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 -e | |
START=${1:-1} | |
END=${2:-10} | |
for i in $(seq ${START} ${END}); do | |
filename=$(printf 'dummy-10GiB-%03d.bin' $i) | |
if [[ -f ${filename} ]]; then | |
echo "Dummy file ${filename} already exists" | |
else |
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
#-------------------------------------- | |
# Build md_event command | |
#-------------------------------------- | |
FROM gcc:bullseye as build | |
COPY ./md_event.c . | |
RUN gcc md_event.c -o md_event | |
#-------------------------------------- | |
# Apache container | |
#-------------------------------------- |
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 | |
set -eu | |
# | |
# Create a self-signed certificate to bootstrap a server | |
# Ref: https://devopscube.com/create-self-signed-certificates-openssl/ | |
# | |
if [ "$#" -ne 1 ] | |
then |
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
var myService = new FargateService(this, "MyService", new FargateServiceProps { | |
Cluster = myCluster, | |
DesiredCount = 2, | |
AssignPublicIp = true, | |
TaskDefinition = myTaskDef, | |
EnableExecuteCommand = true, | |
}); | |
targetGroupPort80.AddTarget(new [] { | |
service.LoadBalancerTarget(new LoadBalancerTargetOptions { |
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 | |
# | |
# Read username and password from the supplied filename | |
# | |
readarray -t lines < $1 | |
username=${lines[0]} | |
password=${lines[1]} | |
# |
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
Get-ChildItem –Path "C:\temp" -Recurse | | |
Where-Object -Property Extension -EQ '.zip' | | |
Foreach-Object { | |
Write-Output $_.FullName | |
$command = "7z x ""$($_.FullName)"" -o""$($_.Directory)"" -aos -bso0 -bsp2" | |
Write-Output $command |
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 | |
json_to_values() { | |
json=$1 | |
echo "env:" | |
jq -r 'to_entries | .[] | " - name: \(.key)\n value: '"'"'\(.value)'"'"'"' <<<$json | |
} | |
read -r -d '' foo << END | |
{ |
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
--- | |
# VPC template for housing EKS clusters | |
# Based on VPC template by Levon Becker v20161125-1430 | |
# https://github.com/stelligent/cloudformation_templates | |
# | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Create a VPC with per-AZ NAT and public/private subnets | |
Parameters: | |
# Cluster Names | |
ClusterName1: |
NewerOlder