Skip to content

Instantly share code, notes, and snippets.

View devthat's full-sized avatar

Jonathan Koch devthat

  • Cologne, Germany
View GitHub Profile
@devthat
devthat / docker-compose.yml
Last active February 8, 2023 09:06
nginx/kibana/elasticsearch in one docker-compose.yml file - it just works
version: "3.7"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.23
container_name: elasticsearch
restart: always
environment:
- xpack.security.enabled=false
- discovery.type=single-node
@devthat
devthat / .gitconfig
Created November 6, 2022 17:05
Git alias
[alias]
coa = commit --amend --no-edit
coaa = commit -a --amend --no-edit
amend = commit -a --amend --no-edit
com = commit -m
coam = commit -am
lol = log --oneline --first-parent
mea = merge --abort
mec = merge --continue
re = rebase
@devthat
devthat / Info.plist
Last active November 7, 2022 06:23
Magic search and open in IntelliJ for the cli
<plist>
<dict>
...
<key>CFBundleIdentifier</key>
<string>com.mycompany.AppleScript.LocalCommand</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
@devthat
devthat / generate-podfile.py
Created November 4, 2021 16:06
Retrieve all versions of a pod to retrieve all versions of all transitive dependencies. This is useful when you need to track security vulnerabilities in dependencies and don't know which version you
import argparse
import multiprocessing
import os
import re
from shutil import copytree
from subprocess import PIPE, run
from sys import stderr
from tempfile import TemporaryDirectory
TEMPLATE_REPO = "git@github.com:peteranny/HelloWorldSDK.git"
@devthat
devthat / ObjectMapperContextResolver.java
Last active May 14, 2021 19:05
Inject ObjectMapper from spring to jersey
import javax.inject.Inject;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* This connects DI from spring to jersey. The object is created by spring, injected here and forwarded to jersey.
*/
@Provider
@devthat
devthat / prepare-commit-msg.sh
Last active May 6, 2020 16:45
git hook that prefixes all commit messages with a ticket-id extracted from the branch name
#!/bin/bash
# extract ticket-id from branch and prepend it to the commit message
# feature-12345-make-things-better -> [#12345] ...
# if commit message already has a ticket-id/merge/revert prefix nothing is done
# if no ticket-id can be extracted (e.g. master) nothing is done
# works with git commit [-m ""] and sourcetree under osx
# installation:
# chmod a+x prepare-commit-msg.sh
# cp prepare-commit-msg.sh .git/hooks/prepare-commit-msg

Keybase proof

I hereby claim:

  • I am devthat on github.
  • I am devthat (https://keybase.io/devthat) on keybase.
  • I have a public key whose fingerprint is 9764 0E3F 8332 2DAB F4B3 20B2 90F7 7A00 1A6E 3630

To claim this, I am signing this object: