Skip to content

Instantly share code, notes, and snippets.

View FingolfinTEK's full-sized avatar

Miloš Milivojević FingolfinTEK

View GitHub Profile
[
{
"year": "2007",
"name": "Import",
"n": 8439
},
{
"year": 2007,
"name": "Export",
"n": 5703
@FingolfinTEK
FingolfinTEK / resources.xml
Last active December 7, 2016 13:00
Rundeck PoC
<project1>
<node1 name="test1" description="Test 1" tags="test" hostname="192.168.182.20" osArch="amd64" osFamily="unix" osName="Linux" username="fingolfintek"/>
<node2 name="kladomat1" description="Kladomat 1" tags="kladomat" hostname="192.168.182.105" osArch="amd64" osFamily="unix" osName="Linux" username="kiosk"/>
</project>
public class ErrorResponse {
private final List<FieldError> fieldErrors;
private final List<String> generalErrors;
public ErrorResponse() {
this(new LinkedList<FieldError>(), new LinkedList<String>());
}
public ErrorResponse(final List<String> generalErrors) {
this(new LinkedList<FieldError>(), generalErrors);
@FingolfinTEK
FingolfinTEK / WebSecurityConfig.java
Last active July 28, 2016 12:40
Custom provider being called for HTTP BASIC
package hello;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
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;
@FingolfinTEK
FingolfinTEK / spring-jackson-auto-vs-manual.jmx
Created July 20, 2016 19:36
JMeter test for SO question 'Why is Spring MVC json serialization 10x slower than calling jackson manually?'
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.9" jmeter="3.0 r1743807">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>