Skip to content

Instantly share code, notes, and snippets.

View raelga's full-sized avatar
🐱
Learning

Rael Garcia raelga

🐱
Learning
View GitHub Profile
@raelga
raelga / tekton-pipelinerun-cleaner.yaml
Last active December 15, 2022 15:30
CronJob to clean up PipelineRuns, keeping up to `NUM_TO_KEEP` of runs of each pipeline
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tekton-pipelinerun-cleaner
labels:
app: tekton-pipelinerun-cleaner
app.kubernetes.io/name: tekton-pipelinerun-cleaner
app.kubernetes.io/component: pipelinerun-cleaner
app.kubernetes.io/part-of: tekton
@raelga
raelga / depgo
Created September 9, 2019 22:19
import sys
import re
regex = r"^([0-9]+)\s+([0-9]{4}\-[0-1][1-9]-[0-3][0-9]-[0-2][0-9]:[0-6][0-9]:[0-6][0-9])\s+(\"[^\"]*\"|\w+)\s+(\"[^\"]*\"|\w+)\s+(\"[\w]*\"|\w+)$"
def dep(fildep):
deps = 0
nodeps = list()
for line in open(fildep):
regdeps = re.search(regex, line, re.MULTILINE)
Cloud Native Barcelona overview
05-2019
Introduction to the Cloud Native Barcelona, the official Cloud Native Computing Foundation user group in Barcelona.
500
https://rael.io/talk/cnbcn-overview/
---
Kubernetes for all: AWS, Azure and GCP
06-2019
Breakdown of the managed Kubernetes distributions in AWS, Azure and GCP.
28
sudo: required
language: go
go:
- "1.12"
services:
- docker
install: true
for u in $(curl -sq https://destinytracker.com/d2/clan/427309/the-packets | sed -n 's@.*clanmembers = \(.*\)</script>@\1@p' | jq -c '.[] | { id: .DestinyUserInfo.membershipId, name:.DestinyUserInfo.displayName }' 2>/dev/null); do echo "$(echo $u | jq -c '.name') - Last played on $(curl -sq https://destinytracker.com/d2/api/profile/2/$(echo $u | jq -r -c '.id' )/recentgames | jq -c '.matches | .[0].period' 2>/dev/null)"; done;
#!/bin/bash
date
function sendMessage {
MESSAGE=$@;
if [ "${MESSAGE}" != "" ];
then
#!/bin/sh
set -euo pipefail
function EnableStackDynamoDbBackups {
local CF_STACK="$1"
local CF_REGION=${2:-eu-central-1}
echo "Getting tables from the $CF_STACK stack in the $CF_REGION region."
@raelga
raelga / authorized_keys
Last active May 14, 2018 15:39
authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtamh2f6em6LhjwR8kaTPZ4RerPmjVeJEJr5t81GtGKQW6+9gr4e8Ou6LPsMn2XplQCDNGZYBWpvQI6YEYzA2DuzWPfOVomvqjwddjsJ01cvyQ2JZejz4qFoAD0g6eMEOgzViquDCWvEmB1PUIHMsjdA4oqtZhGMaSjgG3IcE1NuyGbABFYUiITdzn6CUQBMAnSS34gC4Z6Q2wqUYCjs4wBw5eZsCj3VYR4SonwXF9aMf2JTLZtKaS8xjvURjiY+2wdRYpkExuyUnGB3ycyi6oLCOY4FH0e0o5GQo2VHw+eYu+rJHoIGBFHG9sDof2AR8KHz/l8AJBXtZXaAQb5wU8CsmCQBLEGkg1gq/iIgDkbOpyciZyH5vX4MbaqhsIu3PdgQ0TgwIbaa+xLtSHOdZDw/EIaSfgsvCdwuNa0wy8uNtJqrpvTmA+yfs1AEgeXAZJsJdwG3J9wKXuljwelSBipPyscgQ7FWzAy772mIdcUd0wt+8l3pMEQ482dbJ18sfFYUPZG/f8GGlE4W3XttDIa1lmWD1Y2V8kRB3t1VD3+E6i5x6zxqI9uEmz/nBTI62gZvXVw0NAgnvxkSV3TZSonBZzRwCMiGxqXXQ1yGxWpkCtiks6iy3lUr9/g9EOR+ygY3FSqe3HDJHWbx6ICeZlCT7GvikZUhwOS8PGh/dO/w== rael@mbp17
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQCrDUvuVqxKzauGSmUJQbf0yUFq1KzFWHvSIh/nKfrjRfOm0LdJh1zE0j1Ki7aST2VB8oelHx6d/MPsFU+7EYO7yFkyP9J8E1/EEqT0kq1CBTROoJqJs5hMm/Kwb+Qah3tTXX+mOxJrn0Rsr0Ex/tJwAQsKmEkLaHd5L7O5rySEZG4HIO+4wkSZ3VNWMkpkVJloKiuOi3Xjr8AYKrHZTTcAb2dbuiOgCE6AHddXXwjv2Ve1ARpNO4QXUNvH
<script src="https://unpkg.com/vue"></script>
<main id="app" class="site">
<header class="menu">Twister</header>
<aside class="profile">
Profile Information
</aside>
@raelga
raelga / disk_usage.sh
Created March 31, 2016 07:45
Disk usage inspection
#!/bin/bash
# Get current disk usage
df -h
# Get the top 5 disk consuming folders
du -hxS / 2> /dev/null | sort -rh | head -n5