Skip to content

Instantly share code, notes, and snippets.

ipedrazas / pod.yaml
Created January 17, 2023 12:09
Kubernetes DNS - Adding additional entries with hostAliases
apiVersion: v1
kind: Pod
name: hostaliases-pod
restartPolicy: Never
- ip: ""
- "foo.local"
ipedrazas / gist:334244703c55a937cf536cfa50643e79
Created November 29, 2022 09:33
Renew certs in proxmox, vnc time out issues
# SSH into the node where the failing VMs are running and run these commands:
pvecm updatecerts --force
systemctl restart pvedaemon.service
systemctl restart pveproxy.service
# syntax = docker/dockerfile:1.4
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9-slim AS builder
COPY requirements.txt ./
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt
ipedrazas / debug-dd-extensions.json
Last active October 20, 2022 10:11
Debug statements for Makefile extensions
"extd": {
"scope": "makefile,make",
"prefix": "extd",
"body": [
"debug: # Show Chrome-dev tools",
" docker extension dev debug $(IMAGE):$(TAG)",
"debug-reset: # Reset Chrome-dev tools",
" docker extension dev reset $(IMAGE):$(TAG)",
"debug-ui: # Set UI hot reload",
ipedrazas / gist:6b0b8bc5ae2339b4f21aef342375d656
Last active December 22, 2020 08:35
upload chart using curl
curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
ipedrazas /
Created August 22, 2020 04:47
Processing SIGTERM in python
import signal
import time
class GracefulKiller:
kill_now = False
def __init__(self):
signal.signal(signal.SIGINT, self.exit_gracefully)
signal.signal(signal.SIGTERM, self.exit_gracefully)
def exit_gracefully(self,signum, frame):
ipedrazas / index.css
Created June 12, 2020 17:59
Gitops training - vue.js
html, body {
margin: 0px;
background-color: #3a5e84;
color: white;
padding: 10;
margin-bottom: 20px;
ipedrazas /
Created June 12, 2020 08:33
Gitops Training - python
from flask import Flask, jsonify, request
from flask_cors import CORS
app = Flask(__name__)
@app.route('/ip', methods=["GET"])
def ip():
ipedrazas /
Created June 11, 2020 10:06
Training Requirements


You will need valid accounts for the following systems:


During the training we will use the following tooling:

ipedrazas /
Created May 18, 2020 08:48
Rename USB disk
# Source:
sudo apt-get install ntfsprogs
sudo fdisk -l
sudo umount /dev/sda1
sudo ntfslabel /dev/sda1 usb_ext_6t
mount /dev/sda1 /media/usb/usb_ext_6t