Skip to content

Instantly share code, notes, and snippets.

View hickscorp's full-sized avatar
🎯
Focusing

Pierre Martin hickscorp

🎯
Focusing
View GitHub Profile
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, _, _ ->
@hickscorp
hickscorp / ffcast
Created September 24, 2018 15:59 — forked from jeanparpaillon/ffcast
ffmpeg screen casting
#!/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