Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding, of course!

Mark Heckler mkheck

💭
Coding, of course!
View GitHub Profile
@mkheck
mkheck / RequestHeaderFilterExample
Created Jun 8, 2017
Example of request header filtering by content type in a Spring RestController
View RequestHeaderFilterExample
@RestController
class MapFilterController {
@GetMapping(value = "/test", headers = "content-type=text/*")
public String getTestText() {
return "This is a test, using text.";
}
@GetMapping(value = "/test", headers = "content-type=application/json")
public Map<String, String> getTestJson() {
@mkheck
mkheck / wpa_supplicant-HIDDEN
Last active May 1, 2019
Content of Raspberry Pi (Raspbian) /etc/wpa_supplicant/wpa_supplicant.conf file for connection to hidden SSIDs
View wpa_supplicant-HIDDEN
network={
ssid="put_your_hidden_ssid_here"
scan_ssid=1
psk="put_your_password_for_network_here"
mode=0
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
auth_alg=OPEN
View JacksonExceptionBoot210REL
java.lang.AssertionError: expectation "expectNext(Coffee(id=000-TEST-111, name=Tester's Choice))" failed (expected: onNext(Coffee(id=000-TEST-111, name=Tester's Choice)); actual: onError(org.springframework.core.codec.CodecException: Type definition error: [simple type, class com.thehecklers.cofsvc.Coffee]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.thehecklers.cofsvc.Coffee` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: UNKNOWN; line: -1, column: -1]))
at reactor.test.ErrorFormatter.assertionError(ErrorFormatter.java:105)
at reactor.test.ErrorFormatter.failPrefix(ErrorFormatter.java:94)
at reactor.test.ErrorFormatter.fail(ErrorFormatter.java:64)
at reactor.test.ErrorFormatter.failOptional(ErrorFormatter.java:79)
at reactor.test.DefaultStepVerifierBuilder.lambda$addExpectedValue$10(DefaultStepVerifierBuilder.java:487)
at reactor.test.Defaul
View keybase.md

Keybase proof

I hereby claim:

  • I am mkheck on github.
  • I am mkheck (https://keybase.io/mkheck) on keybase.
  • I have a public key ASCH9SVqoAVt_gOaYBuli0iPTwLHDaKD8IdvBXvH1fEoUwo

To claim this, I am signing this object:

@mkheck
mkheck / SCS_pom_xml_properties.txt
Last active Feb 14, 2018
SCS properties defined in microservices' pom.xml
View SCS_pom_xml_properties.txt
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud-services.version>1.6.0.RELEASE</spring-cloud-services.version>
<spring-cloud.version>Edgware.SR2</spring-cloud.version>
</properties>
@mkheck
mkheck / SCS_pom_xml_dependencyManagement_dependencies.txt
Created Feb 14, 2018
SCS dependencies added to both services' pom.xml dependencyManagement section
View SCS_pom_xml_dependencyManagement_dependencies.txt
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-dependencies</artifactId>
<version>${spring-cloud-services.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@mkheck
mkheck / SCS_pom_xml_dependencies_edgeservice.txt
Created Feb 14, 2018
SCS dependencies added to edge service's pom.xml
View SCS_pom_xml_dependencies_edgeservice.txt
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-config-client</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-service-registry</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
@mkheck
mkheck / SCS_pom_xml_dependencies_backingservice.txt
Last active Feb 14, 2018
SCS dependencies added to backing service's pom.xml
View SCS_pom_xml_dependencies_backingservice.txt
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-config-client</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-service-registry</artifactId>
</dependency>
View SCSCLIMarketplace.txt
humbert :: ~ » cf m
Getting services from marketplace in org pivot-mheckler / space development as mheckler@pivotal.io...
OK
service plans description
app-autoscaler standard Scales bound applications in response to load
metrics-forwarder unlimited Custom metrics service
mongodb-odb standalone, replica_set, sharded_cluster MongoDB Service
p-circuit-breaker-dashboard standard Circuit Breaker Dashboard for Spring Cloud Applications
p-cloudcache extra-small Pivotal Cloud Cache offers the ability to deploy a GemFire cluster as a service in Pivotal Cloud Foundry.
View sz-provider-service log entry
2017-06-27 15:21:45.032 INFO [sz-provider-service,6cb9e5c7261f9d64,85714e4c9db87eaa,false] 3260 --- [nio-8080-exec-9] c.e.s.ProviderController : Logging GET request to /hi