brew install boot2docker
eval $(boot2docker shellinit)
boot2docker up
sudo pip install -U docker-compose
# put the docker-compose.yml file in a directory e.g. ~/Work/docker/cassandra
cd ~/Work/docker/cassandra
docker-compose up
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
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
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
@RunWith(SpringRunner.class) | |
@DataJpaTest | |
public class UserEntityTests { | |
private static final VehicleIdentificationNumber VIN = new VehicleIdentificationNumber( | |
"00000000000000000"); | |
@Rule | |
public ExpectedException thrown = ExpectedException.none(); |
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
package io.github.jhipster.sample.web.rest; | |
import io.github.jhipster.sample.security.jwt.JWTConfigurer; | |
import io.github.jhipster.sample.security.jwt.TokenProvider; | |
import io.github.jhipster.sample.web.rest.vm.LoginVM; | |
import java.util.Collections; | |
import com.codahale.metrics.annotation.Timed; | |
import org.springframework.http.HttpStatus; |
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
package sample.producer.domain; | |
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | |
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | |
import lombok.AccessLevel; | |
import lombok.NoArgsConstructor; | |
import lombok.Value; | |
@Value /* to generate equals, hashCode, getters & toString ( immutable ) */ | |
@NoArgsConstructor(force = true, access = AccessLevel.PACKAGE) /* just for dehydration! as default ctor is used to create object & then fields are set using refection! */ |
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
org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.lang.Object. | |
at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46) | |
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63) | |
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37) | |
at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:212) | |
at com.mongodb.DBObjectCodec.encodeMap(DBObjectCodec.java:222) | |
at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:198) | |
at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:130) |
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 static final int DEFAULT_PAGE_NUMBER = 0; | |
private static final int DEFAULT_PAGE_SIZE = 50; | |
@RequestMapping(value = API_VERSION_1_OBSERVATION, | |
method = RequestMethod.GET, | |
produces = MediaType.APPLICATION_JSON_VALUE) | |
@Timed | |
public ResponseEntity<List<ApiAttachmentObservation>> findObservations(@RequestParam(required = false) String encounterId, | |
@RequestParam(required = false) String patientId, | |
@PageableDefault(page = DEFAULT_PAGE_NUMBER, size = DEFAULT_PAGE_SIZE) |
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 com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
public class PrettyPrintJson | |
{ | |
public static void main(String[] args) | |
{ | |
Person person = new Person(); | |
person.firstName = "John"; | |
person.lastName = "Stark"; |
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
FROM phusion/baseimage:0.9.19 | |
MAINTAINER Rasheed Amir <[email protected]> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" > /etc/apt/sources.list | |
RUN apt-get -y update | |
RUN apt-get -y install sudo nano git sudo zip bzip2 fontconfig wget | |
# install NodeJs | |
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - |