Skip to content

Instantly share code, notes, and snippets.

@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
@diegolovison
diegolovison / basic-operations-test-different-values.xml
Created June 24, 2022 16:51
RadarGun different attribute value for basic-operations-test
<benchmark xmlns="urn:radargun:benchmark:3.0">
<main bindAddress="${main.address:127.0.0.1}" port="${main.port:2103}"/>
<clusters>
<scale from="1" to="1">
<cluster />
</scale>
</clusters>
<configurations>
<config name="dist-1">
@diegolovison
diegolovison / retrieve_openshift_registry.sh
Created March 1, 2022 03:45
How retrieve OpenShift registry
oc login ...
OC_USER=$(oc whoami)
oc project openshift-image-registry
oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
oc policy add-role-to-user registry-viewer $OC_USER
oc policy add-role-to-user registry-editor $OC_USER
REGISTRY_HOST=$(oc get route default-route --template='{{ .spec.host }}')
echo $REGISTRY_HOST