Skip to content

Instantly share code, notes, and snippets.

@diegolovison
diegolovison / jfr_visualizer.md
Created June 25, 2025 17:56
jfr_visualizer.md
# setup
import pandas as pd
import io
import subprocess
import matplotlib.pyplot as plt

!wget -nc https://github.com/parttimenerd/jfr-query-experiments/releases/download/snapshot/query.jar
@diegolovison
diegolovison / repo-config.json
Created June 4, 2025 14:00
repo-config.json
{
"id": "webhook-umb-project-config",
"repoFullName": "lampajr/webhook-umb-example",
"repositoryUrl": "https://github.com/lampajr/webhook-umb-example",
"description": "First example showing Github - UMB - Horreum integration",
"authorizedUsers": [
"lampajr",
"johnaohara",
"barreiro"
],
@diegolovison
diegolovison / plot-hyperfoil-data.md
Last active April 17, 2025 14:46
Collect Hyperfoil data from Jenkins and plot
import os
import requests
from requests.auth import HTTPBasicAuth
import pandas as pd
import json
import matplotlib.pyplot as plt


class DownloadJenkinsHyperfoilData:
@diegolovison
diegolovison / enabling_pg_stat_statements.md
Last active April 1, 2025 20:01
Enabling pg_stat_statements

Find the postgresql.conf location

$ psql -U postgres -c 'show config_file'
               config_file               
-----------------------------------------
 /path/to/postgresql.conf

Edit the file content by adding

SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(null, new TrustManager[] {
new X509ExtendedTrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
}
@Override
@diegolovison
diegolovison / log_pod_event.go
Created November 11, 2024 12:24
log pod events
if pod.Status.Phase != corev1.PodRunning {
// Fetch and log the events for the current pod
events, err := suite.clientset.CoreV1().Events(suite.DSPANamespace).List(suite.Ctx, metav1.ListOptions{
FieldSelector: fmt.Sprintf("involvedObject.name=%s", pod.Name),
})
if err != nil {
for _, event := range events.Items {
t.Log(fmt.Sprintf("Event for Pod %s: %s - %s", pod.Name, event.Reason, event.Message))
}
} else {
[Desktop Entry]
Name=Firefox Localhost
Comment=Open Firefox with localhost
Exec=firefox http://localhost
Icon=firefox
Terminal=false
Type=Application
Categories=Network;WebBrowser;
sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
sudo apt-get --purge remove "*nvidia*"
sudo apt autoremove
sudo apt --fix-broken install
sudo rm -rf /usr/local/cuda*
sudo apt update && sudo apt upgrade
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt purge *550*
@diegolovison
diegolovison / kube_with_kind.md
Last active April 16, 2024 17:39
Kubeflow with kind

Prerequisite

sudo sysctl fs.inotify.max_user_instances=2280
sudo sysctl fs.inotify.max_user_watches=1255360
docker login
cat ~/.docker/config.json
@diegolovison
diegolovison / install_nvidia_driver_fedora37.sh
Created June 17, 2023 02:45
install nvidia driver on fedora 37
Ctrl + Alt + F3
sudo systemctl stop gdm
chmod +x NVIDIA-Linux-x86_64-535.54.03.run
./NVIDIA-Linux-x86_64-535.54.03.run
reboot