Skip to content

Instantly share code, notes, and snippets.

View cpanato's full-sized avatar
🧿

Carlos Tadeu Panato Junior cpanato

🧿
View GitHub Profile
@jimangel
jimangel / README.md
Last active April 24, 2024 19:13
Enable audit logging on a kind cluster

Enable auditing on KinD

TODO

  • Use a webhook vs. file backend (maybe cloudrun?)
  • This might only be possible if Docker is running as root - need to test

Config

Make a temporary directory to host files to be mounted in KinD.

@hoegaarden
hoegaarden / README.md
Last active August 7, 2019 16:18
screenshot & upload failing testgrid boards

Running

# using defaults:
#   BOARDS: sig-release-master-blocking sig-release-master-upgrade
#   STATES: FAILING
./shot.sh
#!/usr/bin/env bash
set -e
set -o pipefail
kubectl proxy &
proxy_pid="$!"
trap 'kill "$proxy_pid"' EXIT
for ns in $(kubectl get namespace --field-selector=status.phase=Terminating --output=jsonpath="{.items[*].metadata.name}"); do
@gserrano
gserrano / errou.sh
Created November 29, 2018 17:03
echo ascii ERROU art
echo -n $'\E[31m'
echo ' -hNNNNNNNNNNNNNNNNNNNNNNNNmdo` '
echo ' .hNNNNNNNNNNNNNNNNNNNNNNNNNNNNNms.. '
echo ' `mNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNmm- '
echo ' /dNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNms` '
echo ' .hNNNNNNmmdmmNmmmmdNdyo+sdmNNNNNNNNNNNNNNh. '
echo ' `hNNNNdo:--...-....::.....--:/sdNNNNNNNNNNmo. '
echo ' `hNNNNs----.````````````````..---yNNNNNNNNNNNy` '
echo ' yNNmm+-----.`````````````````..---/ymNNNNNNNNNh` '
echo ' :NNNN+----..``````````````````....--:hmNNNNNNNNN+ '
export IMAGE=gcr.io/k8s-testimages/kubekins-e2e:latest-master
docker run --privileged -it --rm -v /mydata/docker-graph:/docker-graph -v $(pwd):/workspace/scripts --entrypoint=/bin/bash $IMAGE -c /workspace/scripts/run-test.sh
@caruccio
caruccio / ebs-pvc-migrate.sh
Last active May 27, 2025 11:04
Migrate EBS based PVC to other cluster and/or availability zone
#!/bin/bash
#
# 05-08-2024: Complete rewrite
# 22-05-2025: Add flag --create-test-pod
#
usage()
{
cat <<-EOF
Usage: $0 <REQUIRED-PARAMETERS...> [OPTIONAL-PARAMETERS...]
@benjamincharity
benjamincharity / autonomous.txt
Last active April 21, 2026 08:49
Instructions on how to reset the autonomous desk. This fixes a problem where the desk will not lower (also reportedly fixes incorrectly reported heights).
> Thank you for reaching out to Autonomous! I am sorry to hear that you are having some trouble with your SmartDesk
> but I will be glad to assist. It sounds like your system needs a "hard reset" can I please have you follow these
> steps thoroughly.
Reset Steps:
1. Unplug the desk for 20 seconds. Plug it back in. Wait a full 20 seconds.
2. Press the up and down buttons until the desk lowers all the way and beeps or 20 seconds pass.
3. Release both buttons.
4. Press the down buttons until the desk beeps one more time or 20 seconds pass.
@danieldreier
danieldreier / create_ca.rb
Created August 10, 2014 17:53
Generate dummy SSL certs using the certificate_authority gem
#!/usr/bin/env ruby
require 'certificate_authority'
# Generate root_cert CA using example code at https://github.com/cchandler/certificate_authority
root_cert = CertificateAuthority::Certificate.new
root_cert.subject.common_name= "Dummy CA Root Certificate"
root_cert.serial_number.number=1
root_cert.key_material.generate_key
root_cert.signing_entity = true
signing_profile = {"extensions" => {"keyUsage" => {"usage" => ["critical", "keyCertSign"] }} }
@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@kenrett
kenrett / Selenium Cheat Sheet.md
Last active February 24, 2026 02:11
Selenium Cheat Sheet - Ruby

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">