Skip to content

Instantly share code, notes, and snippets.


Ivan Pedrazas ipedrazas

View GitHub Profile
ipedrazas / gist:334244703c55a937cf536cfa50643e79
Created Nov 29, 2022
Renew certs in proxmox, vnc time out issues
View gist:334244703c55a937cf536cfa50643e79
# 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
View gist:83e37e21f7c6f55f92887eb60f1e039f
# 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 Oct 20, 2022
Debug statements for Makefile extensions
View debug-dd-extensions.json
"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",
View gist:6b0b8bc5ae2339b4f21aef342375d656
curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
ipedrazas /
Created Aug 22, 2020
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 Jun 12, 2020
Gitops training - vue.js
View index.css
html, body {
margin: 0px;
background-color: #3a5e84;
color: white;
padding: 10;
margin-bottom: 20px;
ipedrazas /
Created Jun 12, 2020
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 Jun 11, 2020
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
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
View gist:48e4f50913e40f064d7ddcca46505f66
-v=9 CURL command
-v=8 request and response body
-v=6 method and apipath