Skip to content

Instantly share code, notes, and snippets.

View leovegas's full-sized avatar

Leo leovegas

  • Sweden
View GitHub Profile
@leovegas
leovegas / gist:c6ba77ea437bf4c6b204229bf9a368b7
Created December 24, 2021 11:38
Springfox swagger2 3.0.0 BeanPostProcessor for Spring Boot 2.6.1
@Bean
public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
return new BeanPostProcessor() {
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
}
return bean;
@leovegas
leovegas / pom.xml
Created October 14, 2020 17:16
weather-web-parser
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.main</groupId>
<artifactId>weather-parser</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
@leovegas
leovegas / app_Module.scala
Created October 4, 2020 20:45
Simple Web Chat ver 1
import com.google.inject.AbstractModule
import java.time.Clock
import services.{ApplicationTimer, AtomicCounter, Counter}
/**
* This class is a Guice module that tells Guice how to bind several
* different types. This Guice module is created when the Play
* application starts.
@leovegas
leovegas / version4.js
Created October 2, 2020 18:52
Version using React
console.log("running 4");
const validateRoute = document.getElementById("validateRoute").value;
const createRoute = document.getElementById("createRoute").value;
const deleteRoute = document.getElementById("deleteRoute").value;
const addRoute = document.getElementById("addRoute").value;
const csrfToken = document.getElementById("csrfToken").value;
const tasksRoute = document.getElementById("tasksRoute").value;
*.class
.idea
target/
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
@leovegas
leovegas / GravityBalls_.gitignore
Created August 8, 2020 16:11
Gravity Ball Crossplatform Game on Scala
## Java
*.class
*.war
*.ear
hs_err_pid*
## Robovm
/ios/robovm-build/
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
@leovegas
leovegas / AkkaHttp_.idea_.gitignore
Created August 8, 2020 15:50
Simple-Akka-Http-Server
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
bin/
build/
out/
# Local configuration file (sdk path, etc)
local.properties
.gradle/
/jniLibs/
/resources/