Skip to content

Instantly share code, notes, and snippets.

@Blad3Mak3r
Blad3Mak3r / Animal.kt
Created March 16, 2022 17:54
Redisson Codec for Kotlin JSON Serialization
@Serializable
data class Animal(
val id: Long,
val name: String
)
@nbenns
nbenns / k8s-alternative-mac
Created January 31, 2022 19:16
Install Podman and Kind on Mac to replace docker-desktop
brew install podman --head # you must use head due to issues with kind compatibility
# make sure docker desktop is deleted
sudo unlink /usr/local/bin/docker
sudo ln -s /usr/local/bin/podman /usr/local/bin/docker
podman machine init
podman machine start
podman machine ssh
@phartenfeller
phartenfeller / toMatchIgnoreWhitespace.js
Created August 8, 2020 11:39
Jest custom matcher that ignores whitespace and new lines
// To use:
// Put `<rootDir>/path/to/toMatchIgnoreWhitespace.js` in your Jest config under setupFiles
// Call it in your tests like this:
// expect(received).toMatchIgnoreWhitespace(expected);
// Modified version of: https://gist.github.com/cassidoo/c726872858ce14e793a26619bd6a358f#file-customwhitespacematcher-js-L2
const { diffStringsUnified } = require('jest-diff');
const {
@Flogex
Flogex / postman-diff.md
Last active April 8, 2023 19:11
git diff for Postman Collections

git diff for Postman Collections

The Problem

When exporting a Postman Collection, the body of a request is stored in the "raw" property as a single string. When using git diff, it is hard to compare the changes because the whole line has changed.

Using jq as textconv

It is possible to define in a .gitattributes file what diff driver to use.