Skip to content

Instantly share code, notes, and snippets.

View brunorsch's full-sized avatar
💭
Hi

Bruno Ribeiro brunorsch

💭
Hi
View GitHub Profile
@jrichardsz
jrichardsz / ClassScanner.java
Last active November 28, 2023 15:26 — forked from skempken/Detector.java
Find all annotated classes in a package using Spring
import java.lang.annotation.Annotation;
import java.util.LinkedList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.web.context.support.StandardServletEnvironment;
@wowjeeez
wowjeeez / main.js
Last active June 23, 2023 15:38
GTA 5 screen coords to HTML % (mainly used with FiveM nui)
function coordsToPerc(X, Y) {
const x = X * 100
const y = Y * 100
const style = `style="position:fixed; top:${this.location.y}%; left:${this.location.x}%"`
return {X: x, Y: y, CSS: style}
}