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 'dart:convert'; | |
import 'dart:html' as html; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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
class ResourceAccessKeycloakWebFilter( | |
private val authzClient: AuthzClient | |
) : WebFilter { | |
private val logger: Logger = LoggerFactory.getLogger(ResourceAccessKeycloakWebFilter::class.java) | |
override fun filter(exchange: ServerWebExchange, chain: WebFilterChain): Mono<Void> { | |
return getCurrentUserToken().flatMap { | |
logger.debug("Evaluate authorization of ${exchange.request.path} for user: ${it.getUsername()}") | |
try { |
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
@Component | |
class SPAGatewayFilter : GatewayFilter { | |
val logger: Logger = LoggerFactory.getLogger(SPAGatewayFilter::class.java) | |
companion object { const val INDEX_PATH = "/index.html" } | |
override fun filter(exchange: ServerWebExchange, chain: GatewayFilterChain): Mono<Void> { | |
val req = exchange.request | |
val ex = if(req.headers.accept.contains(MediaType.TEXT_HTML)) { | |
exchange.mutate().request { | |
logger.debug("Replace path: ${req.path} by $INDEX_PATH") |
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
CREATE | |
(a:Asset { name: 'Asset'}), | |
(p:Process { name: 'Process'}), | |
(pa:Process { name: 'Business Process'}), | |
(s:Service { name: 'Service'}), | |
(sa:Service { name: 'IT Service'}), | |
(app:Application { name: 'Application'}), | |
(appca:Application { name: 'Customer Application'}), |
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
// Declare a tasks that depends on other | |
tasks.register("hello") { | |
project.exec { | |
commandLine("cmd", "/c", "echo", "hello") | |
} | |
dependsOn(tasks["bootRun"]) | |
} |
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
# Check repo size | |
git count-objects -vH | |
# List files by size | |
$ git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest | |
# Remove node_modules directory | |
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch node_modules/' --prune-empty --tag-name-filter cat -- --all | |
# Update references |