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
#!/bin/bash | |
set -e | |
function requires() { | |
if ! command -v $1 &>/dev/null; then | |
echo "Requires $1" | |
exit 1 | |
fi | |
} |
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
# Set config up for `tanzu build` | |
# | |
# The <your-container-registry-host-and-path> is the registry and sub-path you want to use to store built container images | |
# for your demos. This registry host needs to be accessible from your demo workstation and from the cluster you are trying | |
# to deploy to. If you can use one of the public registries (DockerHub, GCR, Azure Container Registry, etc) that are | |
# already trusted and also set them to allow anyone to pull from them, your life will be easier for demos. | |
tanzu build config --build-plan-source-type=ucp --containerapp-registry <your-container-registry-host-and-path>/{name} | |
# Clean up deployed demo app in a space (needed until we have `tanzu app delete`) | |
KUBECONFIG=$HOME/.config/tanzu/kube/config kapp delete -a applyapp --dangerous-ignore-failing-api-services |
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
#!/bin/bash | |
# You can reference specific API versions from the `kubectl` cli using the following format: | |
# kubectl get <pluralized-object-name>.<version>.<api-group> | |
# batch/v1beta1 API version of CronJob | |
echo "-- CronJobs --" | |
kubectl get cronjobs.v1beta1.batch -A | |
# discovery.k8s.io/v1beta1 API version of EndpointSlice |
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
#@ load("@ytt:overlay", "overlay") | |
#@ load("@ytt:data", "data") | |
#@ def kind_and_name(kind, name): | |
#@ return overlay.subset({"kind": kind, "metadata": {"name": name}}) | |
#@ end | |
#@overlay/match by=overlay.all, expects=3 | |
--- | |
#@overlay/match-child-defaults missing_ok=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
#!/bin/bash | |
# Borrowed heavily from https://gist.github.com/tomofuminijo/ac321d7b6423bab7f175c8795546bd9a | |
for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output json | jq -r '.[]' | tr '\n' ' '); do | |
echo Checking for detectors in $region | |
detector_id=$(aws guardduty list-detectors --region $region --query "DetectorIds[0]" --output text) | |
# if detector not exist, continue | |
if [ $detector_id = "None" ]; then | |
continue |
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
(Captured from https://web.archive.org/web/20150511090759/http://synergy2.sourceforge.net/autostart.html) | |
Starting synergy automatically | |
You can configure synergy to start automatically when the computer starts or when you log in. The steps to do that are different on each platform. Note that changing these configurations doesn't actually start or stop synergy. The changes take effect the next time you start your computer or log in. | |
Windows | |
Start synergy and click the Configure... button by the text Automatic Startup. The Auto Start dialog will pop up. If an error occurs then correct the problem and click Configure again. | |
On the Auto Start dialog you'll configure synergy to start or not start automatically when the computer starts or when you log in. You need Administrator access rights to start synergy automatically when the computer starts. The dialog will let you know if you have sufficient permission. |
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
k apply -f- << EOF | |
apiVersion: with.sql.tanzu.vmware.com/v1 | |
kind: MySQL | |
metadata: | |
name: mysql-test | |
EOF |
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
#!/bin/bash | |
usage() | |
{ | |
echo "Usage: tanzu-switch [ -v VERSION ]" | |
exit 2 | |
} | |
print_links() | |
{ |
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
cf apps | tail +5 | cut -d ' ' -f1 | xargs -n1 -I{} cf d {} -f -r |
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
<# | |
.SYNOPSIS | |
Create an OpenSSH compatible Public and Private Key in pure Powershell | |
.DESCRIPTION | |
Many scripts rely on the openssh or openssl tools to be available to generate public and private keys compatible with OpenSSH, but this script relies purely on Powershell (and some .NET classes already included) to generate public and private keys. | |
.EXAMPLE | |
PS /git/scripts> ./Create-OpenSSHPubAndPrivateKeys.ps1 -PublicKeyPath my-key.pub -PrivateKeyPath my-key | |
.LINK | |
mailto:[email protected] | |
#> |
NewerOlder