Skip to content

Instantly share code, notes, and snippets.

@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
@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
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*
[Desktop Entry]
Name=Firefox Localhost
Comment=Open Firefox with localhost
Exec=firefox http://localhost
Icon=firefox
Terminal=false
Type=Application
Categories=Network;WebBrowser;
@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 {
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 / 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

@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: