This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private def checkHttpStatus(response: Future[HttpResponse]) { | |
val statusCode = Await.result(response, 10 seconds).status | |
println(s"Status code: ${statusCode.intValue}") | |
assertThat(s"Expected 200 OK or 304 Not Modified, received ${statusCode.intValue}", | |
statusCode.intValue, | |
CoreMatchers.anyOf(CoreMatchers.equalTo(200), CoreMatchers.equalTo(304))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# by http://github.com/jehiah | |
# this prints out some branch status (similar to the '... ahead' info you get from git status) | |
# example: | |
# $ git branch-status | |
# dns_check (ahead 1) | (behind 112) origin/master | |
# master (ahead 2) | (behind 0) origin/master | |
tot_diff=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class Permutations { | |
public static void main(String... args) { | |
System.out.println("Permutations of 'abcd'"); | |
System.out.println(Permutations.of("abcd")); | |
} | |
public static List<String> of(String string) { | |
if (string == null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.List; | |
import org.apache.commons.lang3.SerializationUtils; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.security.jwt.JwtHelper; | |
import org.springframework.security.oauth2.common.OAuth2AccessToken; | |
import org.springframework.security.oauth2.common.OAuth2RefreshToken; | |
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
native ("jvm") module io.codexarcana.web "1.0.0" { | |
import ceylon.net "1.2.0-2"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shared class Try<out Result> given Result satisfies Anything { | |
late Result|Exception computationResult; | |
shared new (Result() computation) { | |
try { | |
this.computationResult = computation(); | |
} catch (Exception e) { | |
this.computationResult = e; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module test.io.eldermael.utils.tryal "1.0.0" { | |
import ceylon.test "1.2.2"; | |
import io.eldermael.utils.tryal "1.0.0"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
native("jvm") module example.ws "1.0" { | |
import javax.jaxws "8"; | |
import maven:"org.springframework:spring-web" "4.3.2.RELEASE"; | |
import maven:"org.springframework:spring-core" "4.3.2.RELEASE"; | |
import maven:"org.springframework:spring-beans" "4.3.2.RELEASE"; | |
import maven:"org.springframework:spring-context" "4.3.2.RELEASE"; | |
import maven:"org.springframework:spring-context-support" "4.3.2.RELEASE"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'com.athaydes.ceylon' version '1.3.0' | |
} | |
ceylon { | |
module = 'io.eldermael.ceylon.boot' | |
} | |
repositories { | |
jcenter() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.boot { ... } | |
import org.springframework.boot.autoconfigure { ... } | |
import org.springframework.stereotype { ... } | |
import org.springframework.web.bind.annotation { ... } | |
import java.lang { JString=String } | |
import ceylon.interop.java { javaClass, javaString } | |
controller | |
enableAutoConfiguration |
OlderNewer