Skip to content

Instantly share code, notes, and snippets.

View steve-todorov's full-sized avatar

Steve Todorov steve-todorov

  • Carlspring Ltd.
  • Bulgaria
  • 18:53 (UTC +03:00)
View GitHub Profile

Motivation

Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.

Idea

Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.

TL;DR;

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingressroutes.traefik.containo.us
spec:
group: traefik.containo.us
version: v1alpha1
names:
kind: IngressRoute
@steve-todorov
steve-todorov / AuthenticationToken.java
Created February 12, 2020 16:21 — forked from phuonghuynh/AuthenticationToken.java
Spring Security - Multiple Authentication Providers
public class AuthenticationToken extends AbstractAuthenticationToken {
private String token;
public AuthenticationToken(String token) {
super(null);
this.token = token;
setAuthenticated(false);
}
@steve-todorov
steve-todorov / System Design.md
Created February 11, 2020 13:39 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
org.carlspring.strongbox.providers.repository.MavenProxyRepositoryProviderTestIT#whenDownloadingArtifactMetadataFileShouldBeMergedWhenExist
Stacktrace
java.lang.NullPointerException
at org.carlspring.strongbox.providers.repository.MavenProxyRepositoryProviderTestIT.whenDownloadingArtifactMetadataFileShouldBeMergedWhenExist(MavenProxyRepositoryProviderTestIT.java:109)
Standard Output
01:13:10.177 03-02-2020 | DEBUG | kJoinPool-1-worker-2 | o.c.strongbox.services.ArtifactManagementService | Artifact checksum matchings: artifact-[strongbox:/storage0/rmmcjtit-snapshots/org/carlspring/strongbox/strongbox-metadata-one/2.0-SNAPSHOT/strongbox-metadata-one-2.0-20190512.202015-1-javadoc.jar]; ext-[md5]; matched-[[MD5]]; unmatched-[null]; checksum-[3397bc670f840b92ee0d7326ac0f4633]
01:13:10.177 03-02-2020 | DEBUG | kJoinPool-1-worker-2 | o.c.s.storage.checksum.ChecksumCacheManager | Removed [strongbox:/storage0/rmmcjtit-snapshots/org/carlspring/strongbox/strongbox-metadata-one/2.0-SNAPSHOT/strongbox-metadata
@steve-todorov
steve-todorov / .block
Created December 10, 2019 17:13 — forked from mbostock/.block
Drag & Zoom
license: gpl-3.0
@steve-todorov
steve-todorov / README.md
Created December 10, 2019 01:21 — forked from jodyphelan/README.md
Force layout on canvas with zoom/pan and drag
@steve-todorov
steve-todorov / Jenkinsfile.groovy
Created October 30, 2019 20:54 — forked from Faheetah/Jenkinsfile.groovy
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@steve-todorov
steve-todorov / gmail-github-filters.md
Created October 1, 2019 13:52 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request