Skip to content

Instantly share code, notes, and snippets.

View dschulten's full-sized avatar

Dietrich Schulten dschulten

View GitHub Profile
@dschulten
dschulten / grub.cfg for Acer Nitro
Created January 8, 2019 11:46
Acer Nitro 5 AN515-42: Add the following before "quiet splash" in grub.cfg, see https://community.acer.com/en/discussion/555251/unable-to-install-ubuntu-in-my-nitro-an512-42
ivrs_ioapic[4]=00:14.0 ivrs_ioapic[5]=00:00.2
version: "3"
services:
web:
image: emilevauge/whoami
networks:
- default
- traefik-net
deploy:
labels:
- "traefik.port=80"
@dschulten
dschulten / create-merge-request.sh
Created September 20, 2020 15:49
Portably capture curl exit status, http status code and response body when creating gitlab merge request
#!/bin/sh
# see https://superuser.com/a/862395/1001553 if you can use bash and want to avoid temp file
# let curl fail on error and print response code while redirecting body to file
# read curl stdout into variable
http_status=$(curl --request POST \
--fail \
--silent --write-out '%{http_code}' \
--output response.json \
--url http://gitlab.dzbw.de/api/v4/projects/4560/merge_requests \
@dschulten
dschulten / JacksonConfigurator.java
Last active September 12, 2024 06:56
Set default timezone of jax-rs jackson provider for deserialization of timestamp to XmlGregorianCalendar JAXB date field.
package de.kommone.kmc.api;
import java.util.TimeZone;
import javax.ws.rs.Produces;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.databind.ObjectMapper;