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
| apiVersion: kyverno.io/v1 | |
| kind: ClusterPolicy | |
| metadata: | |
| name: mutate-rancher-secrets-webhookconfiguration | |
| annotations: | |
| policies.kyverno.io/title: Filter Rancher secrets WebhookConfiguration | |
| policies.kyverno.io/description: >- | |
| Filter Rancher WebhookConfiguration to match secrets not in the `kube-system` namespace | |
| spec: | |
| mutateExistingOnPolicyUpdate: 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 | |
| # Variables | |
| NAMESPACE=$1 # The target namespace (passed as the first argument) | |
| SECRET_NAME=$2 # The imagePullSecret to remove (passed as the second argument) | |
| BACKUP_DIR="sa_backup" # Base directory to store backups | |
| DRY_RUN=$3 # Enable dry-run mode (passed as the third argument: "dry-run") | |
| # Function to check prerequisites | |
| function check_prerequisites() { |
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 | |
| # infos: | |
| # https://github.com/helm/helm/blob/3a3e3846ca9c929a6966583b461181e70f19bc13/internal/resolver/resolver.go#L215 | |
| # https://github.com/helm/helm/blob/983d5c26f805cc5cc29d3c27e8749e140f85b940/internal/resolver/resolver_test.go#L184 | |
| # req: '{Name: "alpine", Version: 0.1.0, Repository: "http://localhost:8879/charts"}' | |
| # lock: '{Name: "alpine", Version: 0.1.0, Repository: "http://localhost:8879/charts"}' | |
| # function: data, err := json.Marshal([2][]*chart.Dependency{req, lock}) |
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
| customRules: | |
| my-rules.yaml: |- | |
| - macro: greetings | |
| condition: > | |
| proc.name = cowsay | |
| - rule: Try to say use cowsay in Container | |
| desc: Detect use of greetings command in container | |
| condition: > | |
| spawned_process and | |
| container and |
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
| SSH_PRIVATE_KEY="xxxxxxxxx - redacted base64 content --- xxxxxxxxx" | |
| AWS_DEFAULT_REGION="eu-west-3" | |
| AWS_ACCESS_KEY_ID="redacted" | |
| AWS_SECRET_ACCESS_KEY="redacted" |
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 | |
| php "./bin/mysql-is-ready" | |
| php app/console doctrine:schema:create --no-debug | |
| php app/console doctrine:schema:update --no-debug |
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/sh | |
| [ -d $HOME/.byobu ] || mkdir $HOME/.byobu | |
| cat <<EOF > $HOME/.byobu/status | |
| # Screen has two status lines, with 4 quadrants for status | |
| screen_upper_left="color" | |
| screen_upper_right="color whoami hostname ip_address menu" | |
| screen_lower_left="color logo distro release #arch session" | |
| screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #ec2_cost #rcs_cost #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #time_utc date time" |
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 | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update -yqq && apt-get upgrade -yqq | |
| echo "enjoy !" |
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
| function github-release-url() { | |
| read -p 'what is GH url of project ?> ' GHU | |
| curl -sS $GHU | perl -ne '/\s+<a href="(.*)" rel="nofollow"/ && print "$1\n"' | |
| } |
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 -x | |
| # -------------------------------------------------- | |
| # stop a synology nas using ssh and poweroff | |
| # -------------------------------------------------- | |
| CURRENTDIR=$(dirname $(realpath $0)) | |
| HOST=${1:-192.168.77.2} | |
| USER=${2:-admin} |
NewerOlder