This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
exec sudo $0 $* | |
exit 0 | |
fi | |
function at_exit { | |
echo "Removing capture module..." | |
rmmod v4l2loopback 2> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule GraphqlHelpers do | |
import Ecto.Query | |
@doc """ | |
## example | |
field :storages, list_of(:storage), do: has_many(:storages) | |
""" | |
defmacro has_many(model) do | |
quote do | |
resolve fn subject, _, _ -> |