Skip to content

Instantly share code, notes, and snippets.

View mariuszs's full-sized avatar

Mariusz Smykuła mariuszs

View GitHub Profile
@mariuszs
mariuszs / FooBarTest.java
Created January 21, 2014 20:37
Fragile test
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.util.Arrays;
import java.util.List;
public class FooBarTest {
@Rule
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`

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!

Fluent Rest client

class WeatherClient {
    String findCity(long latitude, long longitude) {
        return serviceRestClient.forExternalService()
                .get()
                .onUrl("$cityFindingServiceUrl?lat=${latitude.toInteger()}&lon=${longitude.toInteger()}")
                .anObject()
@RestClient
@Logging(loglevel = LogLevel.FULL)
private CityClient clietClient;
@RestClient(loglevel = LogLevel.FULL)
@RestClient(endpoint = "http://city.com/rest/",
version = "v2")
@Logging(logLevel = LogLevel.BASIC)
public class CityService {
@Cache(ttl = 3000)
public CIty findCityByLocation(Location location);
@Logging(logLevel = LogLevel.FULL)
@mariuszs
mariuszs / skype.spec
Created January 7, 2015 19:58
Fedora 21 RPM Spec for Skype
# skype.spec for skype-4.3.0.37 (x32)
#
# Build with: rpmbuild -ba --target=i686 skype.spec
#
# Original skype.spec for 4.2.0.11
# https://github.com/mopsfelder/skype-rpm/blob/master/skype.spec
#%global debug_package %{nil}
Name: skype
@mariuszs
mariuszs / result.log
Last active August 29, 2015 14:18
Ambiguous under java 8 with Float
```java
public class Ambiguous {
public static void main(String... args){
then(bar());
}
public static <E extends Float> E bar() {
return null;
}
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(ServletUtils.java:165)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(PageFlowPageFilter.java:412)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlowPageFilter.java:284)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
@mariuszs
mariuszs / config.fish
Created March 9, 2016 14:25
sdkman 3.3.2+ with fishshell
# sdkman
set PATH $PATH (find ~/.sdkman/candidates/*/current/bin -maxdepth 0)