Skip to content

Instantly share code, notes, and snippets.

View robertojrojas's full-sized avatar

Roberto Rojas robertojrojas

View GitHub Profile
@robertojrojas
robertojrojas / multi-gpu.sh
Created October 10, 2025 21:06 — forked from morgangiraud/multi-gpu.sh
Script for Ubuntu: Nvidia Multi-GPU Installation and Testing
# Script for Ubuntu: Nvidia Multi-GPU Installation and Testing (Adaptable for other distros)
# Step 0: Clean Nvidia Installation
# If you need to completely remove a previous Nvidia installation, use these commands.
# This ensures that you start with a clean slate for a new installation.
sudo apt-get --purge remove "*nvidia*"
sudo apt-get --purge remove "*cuda*" "*cudnn*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" "*libnccl*"
# Verify that the removal is complete by checking if any Nvidia, CUDA, or cuDNN packages are still installed.
apt list --installed | grep cuda
@robertojrojas
robertojrojas / fw-common.tf
Created October 4, 2025 21:16 — forked from travisgroth/fw-common.tf
GKE Egress Rules Example Terraform
# Copyright 2025 Travis Groth
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@robertojrojas
robertojrojas / fork_and_daemon.go
Created November 5, 2024 00:36 — forked from smallnest/fork_and_daemon.go
golang fork and exec and handle signals
package main
import (
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
)
@robertojrojas
robertojrojas / folder_structure.md
Created November 1, 2024 23:28 — forked from ayoubzulfiqar/folder_structure.md
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@robertojrojas
robertojrojas / DaprErrorHandlingCodes.md
Last active April 4, 2023 17:25
Dapr - Error Handling/Codes Proposal

Dapr Error Handling/Codes

Problem

Across Dapr errors are surfaced for different conditions, without consistent messages, details of the error, standard formats, and no clear indication of what/where the error initiated.

This makes troubleshooting and debugging quite difficult and requires a deep understanding of the parts of Dapr and how those parts interact with each other.

To help with the issues raised above, it would be ideal if a solution could provide:

  • Greater details of errors that occured.
@robertojrojas
robertojrojas / external_ip_websites.txt
Created October 4, 2022 23:49 — forked from StrongWind1/external_ip_websites.txt
Domains you can "curl" to get your external IP address based on using the name of the common network utilities ipconfig and ifconfig as the domain.
Use by running "curl $domain"
IP with no line terminator such as Carriage Return (\x0D) or Line Feed (\x0A):
ifconfig.be
ifconfig.ca
ifconfig.cc
ifconfig.in
ifconfig.me
ifconfig.rest
ifconfig.so
@robertojrojas
robertojrojas / route_dump.c
Created April 8, 2022 02:01 — forked from cl4u2/route_dump.c
Linux route monitoring example
/*
iflist.c : retrieve network interface information thru netlink sockets
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute
v1.0 : initial version - Feb 19th 2010
This file was obtained at the following address :
http://www.iijlab.net/~jean/iflist.c
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/