Skip to content

Instantly share code, notes, and snippets.

View christian-draeger's full-sized avatar
free software, free society

Christian Dräger christian-draeger

free software, free society
View GitHub Profile
@bizob2828
bizob2828 / Dockerfile
Created June 30, 2022 20:33
Next.js with-docker Dockerfile update to get Node.js Next.js plugin to work
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
#COPY package.json yarn.lock ./
#RUN yarn install --frozen-lockfile
# If using npm with a `package-lock.json` comment out above and use below instead
COPY package.json package-lock.json ./
@outofcoffee
outofcoffee / RestAssuredKotlin.md
Created July 25, 2017 20:07
DSL for using RestAssured with Kotlin

DSL for using RestAssured with Kotlin

Example

        given {
            on {
                get("/orders/123") itHas {
                    statusCode(404)
                }

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@christophercurrie
christophercurrie / Polymorph.java
Created February 11, 2014 17:20
Example of Polymorphic Deserialization using Jackson
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value=AudioAttachment.class, name="audio"),
@JsonSubTypes.Type(value=LinkAttachment.class, name="link")