Skip to content

Instantly share code, notes, and snippets.

View felipewind's full-sized avatar

Felipe Henrique Gross Windmoller felipewind

View GitHub Profile
@denguir
denguir / cuda_install.md
Last active May 8, 2025 16:23
Installation procedure for CUDA / cuDNN / TensorRT

How to install CUDA / cuDNN / TensorRT on Ubuntu

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@andrebreves
andrebreves / BrazilianHoliday.java
Last active January 2, 2024 13:02
Date calculations considering Brazilian Holidays
import java.time.LocalDate;
import static java.time.Month.APRIL;
import static java.time.Month.DECEMBER;
import static java.time.Month.JANUARY;
import static java.time.Month.MAY;
import static java.time.Month.NOVEMBER;
import static java.time.Month.OCTOBER;
import static java.time.Month.SEPTEMBER;
import java.time.MonthDay;
import java.time.Year;
@Jarmos-san
Jarmos-san / main.py
Last active May 1, 2025 20:05
A simple FastAPI project with a health check route
"""Entrypoint to invoke the FastAPI application service with."""
from fastapi import FastAPI, status
from pydantic import BaseModel
import uvicorn
app = FastAPI()
class HealthCheck(BaseModel):
@CarlosPanarello
CarlosPanarello / CalcUtil.java
Created March 4, 2021 19:20
Calculate the elapsed time in seconds
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.Duration;
import java.time.Instant;
public class CalcUtil {
private static final BigDecimal MULTIPLIER_NANO_TO_SECONDS = new BigDecimal(1.0E9D);
/**
* Calculate the elapsed time in seconds
//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.smallrye.reactive:smallrye-mutiny-vertx-web-client:1.1.0
//DEPS io.smallrye.reactive:mutiny:0.7.0
//DEPS org.slf4j:slf4j-nop:1.7.30
package io.vertx.mutiny.quotes;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
@amiyasahu
amiyasahu / GetterSetterVerifier.java
Created June 7, 2018 20:17 — forked from mjpitz/GetterSetterVerifier.java
A class that uses reflection to automate the testing of getters and setters.
import com.google.common.base.Defaults;
import com.google.common.collect.Sets;
import javax.annotation.Nonnull;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Set;
@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 5, 2025 09:32
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j