Skip to content

Instantly share code, notes, and snippets.

View robertojrojas's full-sized avatar

Roberto Rojas robertojrojas

View GitHub Profile
@robertojrojas
robertojrojas / manjaro_kernel.md
Created April 8, 2026 00:16 — forked from vicente-gonzalez-ruiz/manjaro_kernel.md
Adding new kernel in Manjaro

Installing a new kernel in Manjaro

There are several alternatives:

  1. Download a pre-compiled kernel from the Manjaro repos.
  2. Download a source kernel from the Manjaro repos and compile it. This should optimize the binaries for your chipset.
  3. Download a source kernel from https://www.kernel.org/ and compile it. Optimized, but harder to configure :-/

1. Using a pre-compiled kernel:

See https://wiki.manjaro.org/index.php/Manjaro_Kernels

NVIDIA-SMI Comprehensive Cheat Sheet

Overview

nvidia-smi (NVIDIA System Management Interface) is a command-line tool that provides monitoring, management, and diagnostic information for NVIDIA GPU devices.

It communicates directly with the NVIDIA driver and GPU, and can:

  • Monitor GPU performance, temperature, and utilization
  • Manage power, clock speeds, and ECC
  • Control persistence mode and compute modes
@robertojrojas
robertojrojas / Rust on V6.14.md
Created April 2, 2026 21:20 — forked from pranav083/Rust on V6.14.md
testing kernel with rust Linux v6.14

Setting Up Linux Kernel v6.14 with Rust Support

This guide provides step-by-step instructions to set up, build, and configure Linux kernel version 6.14 with Rust support on an Ubuntu 24.04 virtual machine (VM) running in QEMU. It includes version prerequisites, enabling Rust support, and building/testing sample Rust kernel modules (rust_mymodule and rust_usb_serial). The setup supports a physical QinHeng CH340 USB-serial device (0x1a86:0x7523) passed through to the VM and a virtual USB device (0x1234:0x5678) for testing.

Prerequisites

System Requirements

  • OS: Ubuntu 24.04 LTS (VM disk: u22s_rust.qcow2)
  • CPU: x86_64 architecture (QEMU with -cpu host)
  • Memory: 16 GB RAM (QEMU with -m 16G)
@robertojrojas
robertojrojas / archlinux-qemu-kvm.md
Created April 1, 2026 23:02 — forked from tatumroaquin/archlinux-qemu-kvm.md
QEMU-KVM Installation for Arch Linux

QEMU-KVM in Arch Linux

Check Virtualization Support

lscpu | grep -i Virtualization
  • VT-x for Intel
  • AMD-Vi for AMD

Ensure that your kernel includes KVM modules

@robertojrojas
robertojrojas / gist:c2bada5c23652bab0eda4a33683f4d0c
Created November 7, 2025 22:45 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@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