Skip to content

Instantly share code, notes, and snippets.

Mariusz Smykuła mariuszs

Block or report user

Report or block mariuszs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
package com.example.restdemo;
import java.util.Arrays;
import java.util.List;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
mariuszs /
Created Apr 6, 2019
FriendlyIdConverterProvider for Dropwizard
public class FriendlyIdConverterProvider implements ParamConverterProvider {
public <T> ParamConverter<T> getConverter(Class<T> clazz, Type type, Annotation[] annotations) {
if (clazz.getName().equals(UUID.class.getName())) {
return new ParamConverter<T>() {
mariuszs /
Created Mar 9, 2016
sdkman 3.3.2+ with fishshell
# sdkman
set PATH $PATH (find ~/.sdkman/candidates/*/current/bin -maxdepth 0)
View rogers
Bring your own phone
Error opening /portlets/common/checkout/leadGenShareReadyOrderSummary.jsp.
The source of this error is:
javax.servlet.ServletException: java.lang.NullPointerException
at org.apache.beehive.netui.util.internal.ServletUtils.throwServletException(
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
mariuszs / result.log
Last active Aug 29, 2015
Ambiguous under java 8 with Float
View result.log
public class Ambiguous {
public static void main(String... args){
public static <E extends Float> E bar() {
return null;
mariuszs / skype.spec
Created Jan 7, 2015
Fedora 21 RPM Spec for Skype
View skype.spec
# skype.spec for skype- (x32)
# Build with: rpmbuild -ba --target=i686 skype.spec
# Original skype.spec for
#%global debug_package %{nil}
Name: skype
@RestClient(endpoint = "",
version = "v2")
@Logging(logLevel = LogLevel.BASIC)
public class CityService {
@Cache(ttl = 3000)
public CIty findCityByLocation(Location location);
@Logging(logLevel = LogLevel.FULL)
View gist:774477c9792929d55fe1
@Logging(loglevel = LogLevel.FULL)
private CityClient clietClient;
@RestClient(loglevel = LogLevel.FULL)
View gist:7266141206429e7e6428

Fluent Rest client

class WeatherClient {
    String findCity(long latitude, long longitude) {
        return serviceRestClient.forExternalService()
View gist:82b6a334799df0d34dcc

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi. Cras vel lorem. Etiam pellentesque aliquet tellus. This should not break here!

Here is proper break!

You can’t perform that action at this time.