Skip to content

Instantly share code, notes, and snippets.

View andreasknoepfle's full-sized avatar
🐒

Andreas Knöpfle andreasknoepfle

🐒
View GitHub Profile
### Keybase proof
I hereby claim:
* I am andreasknoepfle on github.
* I am andreasknoepfle (https://keybase.io/andreasknoepfle) on keybase.
* I have a public key ASARu_h5X9Qu_Ad7CcPC2s5mqm6ZPlxCBaQuKaA6CGuTkQo
To claim this, I am signing this object:
@andreasknoepfle
andreasknoepfle / README.md
Created December 22, 2019 14:01
Postgres ASDF uuid

asdf Version Manager & Postgres UUID

Compiling Postgres with UUID to use in asdf

Lately I started using asdf, which is a great version manager for nearly anything (ruby, elixir, node, postgres...) . At my work I sometimes have to switch between different postgres versions, so I was happy that there also is a postgres plugin for asdf. But as soon as I was working on a project that uses UUIDs as primary keys in postgres I ran into postgres not being build with the uuid extension.

ERROR:  could not open extension control file "...some-asdf-path.../uuid-ossp.control": No such file or directory
Also apperantly on Mac systems, there is some trouble with ossp-uuid not being able to compile.
@andreasknoepfle
andreasknoepfle / custom_filters.ex
Last active January 24, 2023 09:37
Custom Flop filters
defmodule Flop.CustomFilters do
@default_op :==
@type filter :: atom() | {field :: atom(), op :: atom()}
@type filter_value :: binary() | nil
@type filter_values :: %{required(filter()) => filter_value()}
@doc """
Remove a filter from the params for flop, so flop does not handle them
anymore. This can be used to implement missing features in flop filters.