Skip to content

Instantly share code, notes, and snippets.

@jonathanagustin
jonathanagustin / keybase.md
Last active October 18, 2025 02:06
keybase.md

Keybase proof

I hereby claim:

  • I am jonathanagustin on github.
  • I am drengskapur (https://keybase.io/drengskapur) on keybase.
  • I have a public key whose fingerprint is 6DED 1D8C 4F9A 4376 7394 C58A 0C80 E974 9273 65DE

To claim this, I am signing this object:

@jonathanagustin
jonathanagustin / notes.md
Last active October 3, 2025 09:04
consul research notes

Research Notes

Connection Refused Error

When deploying microservices in Kubernetes, one might encounter this error:

upstream connect error or disconnect/reset before headers. reset reason: connection failure, 
transport failure reason: delayed connect error: 111
@jonathanagustin
jonathanagustin / setup.sh
Created September 3, 2025 17:10
TAK Server Setup Script
#!/bin/bash
color() {
STARTCOLOR="\e[$2";
ENDCOLOR="\e[0m";
export "$1"="$STARTCOLOR%b$ENDCOLOR"
}
color info 96m
color success 92m
color warning 93m
@jonathanagustin
jonathanagustin / bootstrap.py
Last active June 30, 2024 11:26
Bootstrap Google Colab
%matplotlib inline
def bootstrap():
# @title Bootstrap Google Colab {display-mode:"form"}
# CONFIGURE: Parameters
GOOGLE_DRIVE_FOLDER = "my_folder" # @param {type:"string"}
GitHub = True # @param {type:"boolean"}
OpenAI = True # @param {type:"boolean"}
HuggingFace = True # @param {type:"boolean"}
@jonathanagustin
jonathanagustin / Kubernetes Resource Extractor.md
Last active June 6, 2024 05:56
Kubernetes Resource Extractor

Resource Extractor

This Go application parses the output of a helm template or kubectl kustomize command and extracts resource information, generating a CSV file with the extracted data.

Prerequisites

  • Go (version 1.17 or later)
  • Helm (version 3 or later) (if using Helm)
  • kubectl (if using Kustomize)
@jonathanagustin
jonathanagustin / install-autogluon-colab.py
Last active May 31, 2024 02:47
Install autogluon on Google Colab
%%capture
# ---------------------------------------------------------------------------- #
# @title Install autogluon on Google Colab { display-mode: "form" }
# ---------------------------------------------------------------------------- #
import contextlib
with open('/content/install-autogluon.log', 'w') as f:
with contextlib.redirect_stdout(f):
%pip install uv
!git clone --recurse-submodules --depth=1 https://github.com/autogluon/autogluon.git
!uv pip install --system -e /content/autogluon/common/
@jonathanagustin
jonathanagustin / install-auto-sklearn-colab.py
Last active May 31, 2024 02:46
Install auto-sklearn on Google Colab
%%capture
# ---------------------------------------------------------------------------- #
# @title Install auto-sklearn on Google Colab { display-mode: "form" }
# ---------------------------------------------------------------------------- #
import contextlib
with open('/content/install-auto-sklearn.log', 'w') as f:
with contextlib.redirect_stdout(f):
%pip install uv
!uv pip install --system Cython==0.29.36 pyparsing==2.4
!uv pip install --system -r https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt
@jonathanagustin
jonathanagustin / git-lfs-track.py
Created May 26, 2024 15:40
Git LFS Track Files Over a Threshold (Default is 100MB)
#!/usr/bin/env python3
import subprocess
from pathlib import Path
SKIP_LIST = [
".git",
"build",
"venv",
".venv",
"node_modules",
print("Hello, World!")
@jonathanagustin
jonathanagustin / colab2pdf.py
Created November 7, 2023 22:51
Convert your Colab notebook to a PDF. One-minute install. Zero configuration.
# Colab2PDF v1.0.0 by Drengskapur (github.com/drengskapur/colab2pdf) (License: GPL-3.0-or-later)
# @title {display-mode:"form"}
# @markdown ⬇️ Download PDF
def colab2pdf():
ENABLE=True # @param {type:"boolean"}
if ENABLE:
import os, datetime, json, pathlib, urllib, requests, werkzeug, nbformat, google, yaml, warnings
NAME = pathlib.Path(werkzeug.utils.secure_filename(urllib.parse.unquote(requests.get(f"http://{os.environ['COLAB_JUPYTER_IP']}:{os.environ['KMP_TARGET_PORT']}/api/sessions").json()[0]["name"])))
TEMP = pathlib.Path("/content/pdfs") / f"{datetime.datetime.now().strftime('%Y%m%d_%H%M%S')}_{NAME.stem}"; TEMP.mkdir(parents=True, exist_ok=True)
NB = [cell for cell in nbformat.reads(json.dumps(google.colab._message.blocking_request("get_ipynb", timeout_sec=30)["ipynb"]), as_version=4).cells if "--Colab2PDF" not in cell.source]