Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
wiremockDir="wiremock"
wiremockVersion="2.27.1"
wiremockPort="8666"
wiremockFile=wiremock-standalone-${wiremockVersion}.jar
echo -e "\\nStarting wiremock ...\\n"
if ! [ -e "$wiremockFile" ]; then
@eiselems
eiselems / SecurityConfig.java
Created May 16, 2018 06:12
SecurityConfig for Zuul
package com.marcuseisele.springboot_microservices.gateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
@eiselems
eiselems / swagger-ui.html
Created December 11, 2017 11:57
Swagger UI html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="icon" type="image/png" href="webjars/springfox-swagger-ui/images/favicon-32x32.png" sizes="32x32"/>
<link rel="icon" type="image/png" href="webjars/springfox-swagger-ui/images/favicon-16x16.png" sizes="16x16"/>
<link href='webjars/springfox-swagger-ui/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='webjars/springfox-swagger-ui/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
@eiselems
eiselems / TestCase.java
Last active November 28, 2017 10:00
Example of RestAssured
//@formatter:off
given()
.headers(createBasicAuth())
.body(JsonUtil.toJSON(myPayload))
.log().all()
.when()
.post(baseUrl + "/v1/myapi/")
.then()
.statusCode(HttpStatus.BAD_REQUEST.value());
//@formatter:on
<!-- Navigation Start -->
<nav class="navbar navbar-custom navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars"></i>
</button>
{% if page.section-type == "index" %}
@eiselems
eiselems / 503
Created May 24, 2016 06:43
npm access
Error 503 No healthy backends
No healthy backends
Guru Mediation:
Details: cache-fra1251-FRA 1464072103 128735361
Varnish cache server
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9)
entering extended mode
(ausarbeitung.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
(C:\MiKTeX\tex\latex\oberdiek\kvoptions-patch.sty
(C:\MiKTeX\tex\generic\oberdiek\etexcmds.sty
(C:\MiKTeX\tex\generic\oberdiek\infwarerr.sty)
(C:\MiKTeX\tex\generic\oberdiek\ifluatex.sty)))
(C:\MiKTeX\tex\latex\nag\nag.sty (C:\MiKTeX\tex\latex\nag\nag-l2tabu.cfg)