This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.web.reactive.HandlerMapping; | |
| import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping; | |
| import org.springframework.web.reactive.socket.WebSocketHandler; | |
| import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter; | |
| import java.util.HashMap; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WASM_MODULE = cpp17 | |
| CC = em++ | |
| CXXFLAGS = --bind -O3 -x c++ -std=c++17 -s ALLOW_MEMORY_GROWTH=1 -s 'MALLOC="emmalloc"' | |
| .PHONY : all clean | |
| all: $(WASM_MODULE).wasm ## Build all Wasm | |
| $(WASM_MODULE).wasm: $(WASM_MODULE).cpp ## Compile cpp17.wasm | |
| $(CC) $(CXXFLAGS) -o $(WASM_MODULE).js $(WASM_MODULE).cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @startuml | |
| class Building { | |
| - apartments | |
| } | |
| Building --* Apartment: contains > | |
| class Car { | |
| - wheels | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kotlinc -include-runtime hello.kt -d hello.jar | |
| native-image -jar hello.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.mvnsearch.builder | |
| class FoodOrder private constructor(builder: FoodOrder.Builder) { | |
| val bread: String? | |
| val meat: String? | |
| init { | |
| this.bread = builder.bread | |
| this.meat = builder.meat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "Envoy Proxy config schema", | |
| "description": "JSON Schema for Envoy Proxy config", | |
| "type": "object", | |
| "properties": { | |
| "admin": { | |
| "type": "object", | |
| "description": "Configuration for the local administration HTTP server", | |
| "properties": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public final class FilenameComparator implements Comparator<String> { | |
| private static final Pattern NUMBERS = | |
| Pattern.compile("(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)"); | |
| private static final Pattern FILE_ENDING = | |
| Pattern.compile("(?<=.*)(?=\\..*)"); | |
| @Override | |
| public final int compare(String o1, String o2) { | |
| if (o1 == null || o2 == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.autoconfigure.web.ServerProperties; | |
| import org.springframework.context.annotation.Configuration; | |
| import javax.annotation.PostConstruct; | |
| import java.net.Inet6Address; | |
| import java.net.InetAddress; | |
| import java.net.NetworkInterface; | |
| import java.util.Arrays; | |
| import java.util.Collections; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for file in ~/.bashrc.d/*.bashrc; | |
| do | |
| source “$file” | |
| done |