Skip to content

Instantly share code, notes, and snippets.

View rberrelleza's full-sized avatar
👋
Hi friend!

Ramiro Berrelleza rberrelleza

👋
Hi friend!
View GitHub Profile
@rberrelleza
rberrelleza / code-verification-SKILL.md
Created February 11, 2026 23:54
Code verification skill for claude code
name description
code-verification
Verifies that the generated code works end to end. Use to validate that the generated code works or when the user asks "check if this code works" or "validate end to end" or "test with okteto"

Use the Okteto CLI, Kubernetes clusters, and all Okteto features to validate that the code you generate can be built, deployed, works end to end and to execute tests. You operate within an Okteto Namespace with full context of the platform's capabilities. You have deep expertise in Kubernetes, Docker, Helm charts, container security, and cloud-native architecture best practices. You have full access to the Okteto platform and fully understand your capabilities. You collaborate closely with the USER through pair programming sessions, assisting with tasks such as:

  • Creating new cloud-native applications from scratch.
@rberrelleza
rberrelleza / sitemap.xml
Last active May 15, 2024 10:58
sitemap 1.19
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url>
<loc>https://www.okteto.com/docs/archives/</loc>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
@rberrelleza
rberrelleza / okteto.yaml
Last active March 14, 2024 18:32
Check if your deployment is a preview environment or a development environment
deploy:
- name: is preview environment?
command: |
# okteto inserts the preview.okteto.com label only on preview environments
kubectl get namespace $OKTETO_NAMESPACE -o jsonpath='{.metadata.labels}' | grep -q "preview.okteto.com"
exit_code=$?
# we add the PREVIEW_ENVIRONMENT variable to the OKTETO_ENV so it can be used in the rest of the deploy commands
if [ $exit_code -eq 0 ]; then
echo "ENVIRONMENT_TYPE=preview" >> $OKTETO_ENV
@rberrelleza
rberrelleza / crds-0.9.8.yaml
Created February 4, 2022 03:10
crds-0.9.8.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: certificaterequests.cert-manager.io
annotations:
cert-manager.io/inject-ca-from-secret: 'okteto/cert-manager-webhook-ca'
labels:
app: 'cert-manager'
app.kubernetes.io/name: 'cert-manager'
app.kubernetes.io/instance: 'cert-manager'
@rberrelleza
rberrelleza / octane-policy.yaml
Created January 20, 2021 00:16
Run octane on clusters that allow PSP
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: octane
spec:
allowPrivilegeEscalation: true
allowedCapabilities:
- '*'
defaultAllowPrivilegeEscalation: true
fsGroup:
@rberrelleza
rberrelleza / main.go
Created August 26, 2020 04:16
go downloader with progress bar
package main
import (
"io"
"net/http"
"os"
"github.com/cheggaaa/pb/v3"
)
@rberrelleza
rberrelleza / clean-branch
Last active June 25, 2020 21:31
clean git branches
git branch | grep -v 'master\|main' > /tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -D </tmp/merged-branches
@rberrelleza
rberrelleza / delete-branches.sh
Created May 5, 2020 22:52
delete old branches
git branch | grep -v master | xargs -n1 git branch -D
@rberrelleza
rberrelleza / okteto.yml
Last active May 1, 2020 02:35
dev env with a mysql client
name: client-mysql
image: mysql
command:
- sh
forward:
- 3306:mysql:3306
resources:
limits:
memory: 128Mi
cpu: 200m
@rberrelleza
rberrelleza / terminate-namespace.sh
Created April 20, 2020 18:23
Force terminate a namespace stuck in the terminating phase
namespace=$1
kubectl get namespace $namespace -ojson | jq 'del(.spec.finalizers[0])' | kubectl replace --raw "/api/v1/namespaces/$namespace/finalize" -f=-