Skip to content

Instantly share code, notes, and snippets.

Avatar

Björn Wilmsmann BjoernKW

View GitHub Profile
@BjoernKW
BjoernKW / HttpToHttpsRedirectConfig.java
Last active Nov 20, 2019
http to https redirect with Spring Cloud Gateway
View HttpToHttpsRedirectConfig.java
package com.bjoernkw.gateway;
@Configuration
public class HttpToHttpsRedirectConfig {
@Value("${server.port}")
private Integer gatewayPort;
@PostConstruct
public WebServerFactoryCustomizer serverFactoryCustomizer() {
@BjoernKW
BjoernKW / gist:c2581ab5a6a4c5f92cfffd4fcbe25ff9
Created Mar 30, 2019
Angular CLI command for building an app with base href
View gist:c2581ab5a6a4c5f92cfffd4fcbe25ff9
ng build --base-href /ROOT_DIRECTORY/ --deploy-url /ROOT_DIRECTORY/ --prod
@BjoernKW
BjoernKW / using-angular2-logger-in-production.md
Created Aug 17, 2018
Using angular2-logger in production
View using-angular2-logger-in-production.md
import { Logger, Options } from 'angular2-logger/core';

...

{
  provide: Options,
  useValue: {
    store: false
  }
@BjoernKW
BjoernKW / angular-unit-tests-specs-dependency-management.md
Last active Aug 15, 2018
Dependency management for Angular unit tests using TestModuleMetadata
View angular-unit-tests-specs-dependency-management.md

some.component.spec.ts:

import { TestModuleMetadata } from '@angular/core/testing';
import { createOtherTestModuleMetadata } from 'other.component.spec';
import { compileTestModuleMetadata } from 'app.module';

...

export function createSomeComponentTestModuleMetadata(): TestModuleMetadata {
View activemq-pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
@BjoernKW
BjoernKW / NextSequenceService.java
Last active Dec 2, 2019
Next sequence with MongoDB
View NextSequenceService.java
import static org.springframework.data.mongodb.core.FindAndModifyOptions.options;
import static org.springframework.data.mongodb.core.query.Criteria.where;
import static org.springframework.data.mongodb.core.query.Query.query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Service;
import com.model.CustomSequences;
View gist:4b294fa76eae07ce45bb
Verifying that +bjoernkw is my blockchain ID. https://onename.com/bjoernkw
View keybase.md

Keybase proof

I hereby claim:

  • I am BjoernKW on github.
  • I am bjoernkw (https://keybase.io/bjoernkw) on keybase.
  • I have a public key whose fingerprint is 6222 87E1 DE98 9114 AED0 2999 B658 5F6F 4206 A142

To claim this, I am signing this object: