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
#!/usr/bin/env sh | |
set -e | |
: ${INSTALL_DIR:="${HOME}/bin"} | |
export HELM_INSTALL_DIR=$INSTALL_DIR | |
# Get Minikube | |
curl -Lo ${INSTALL_DIR}/minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 | |
chmod +x ${INSTALL_DIR}/minikube |
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
#!/usr/bin/env sh | |
curl -L -s https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip -o /tmp/chromedriver_linux64.zip \ | |
&& sudo sh -c 'unzip -p /tmp/chromedriver_linux64.zip > /usr/local/bin/chromedriver' \ | |
&& sudo chmod +x /usr/local/bin/chromedriver \ | |
&& rm /tmp/chromedriver_linux64.zip |
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
#!/usr/bin/env sh | |
set -e | |
# Usage: | |
# latest-github-release.sh cloudfoundry/bosh-bootloader linux | |
# $1 - org/repo | |
# $2 - passed to grep (i.e., linux, x86-64, rpm, deb, darwin, etc.) | |
# $3 - final binary name (terraform, cat, dog, etc.) | |
# | |
# If you want to be super fancy (and risky): |
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 | |
# | |
# In the local directory 3 files are required | |
# new_cert.crt - new machine certificate | |
# new_cert.key - private key for certificate | |
# intermediary.crt - certificate chain of the signing authority for new_cert.crt | |
# | |
# Run commands on the vCSA shell: | |
# import intermediary authority cert: |
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
echo "Q" | openssl s_client -showcerts -connect $VCENTER:443 2>/dev/null | openssl x509 -sha1 -fingerprint -noout | sed 's/SHA1 Fingerprint=//' |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: security-context-root-pod | |
spec: | |
securityContext: | |
runAsUser: 0 | |
containers: | |
- name: whatever | |
image: busybox |
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 | |
set -o pipefail | |
# Add user to k8s using service account or build kubeconfig for existing service account, no RBAC (must create RBAC after this script) | |
if [[ -z "$1" ]] || [[ -z "$2" ]] || [[ -z "$3" ]]; then | |
echo "usage: $0 <service_account_name> <namespace> <target_folder>" | |
exit 1 | |
fi |
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
package main | |
import ( | |
"fmt" | |
"github.com/aws/aws-sdk-go/aws/endpoints" | |
"gopkg.in/gcfg.v1" | |
) | |
type CloudConfig struct { |
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] | |
[ServiceOverride "ec2"] | |
URL = "https://ec2.${AWS_ENDPOINT_URL}" | |
SigningRegion = "${AWS_REGION}" | |
Region = "${AWS_REGION}" | |
SigningMethod = v4 | |
Service = ec2 | |
[ServiceOverride "elasticloadbalancing"] |
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
oscap xccdf generate fix --profile xccdf_org.ssgproject.content_profile_ospp --template urn:xccdf:fix:script:ansible xccdf-file.xml |