Skip to content

Instantly share code, notes, and snippets.

Percy Grunwald percygrunwald

Block or report user

Report or block percygrunwald

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@percygrunwald
percygrunwald / ansible.cfg
Last active Jan 15, 2019
My Default `ansible.cfg`
View ansible.cfg
[defaults]
inventory = ./inventory
host_key_checking = False
vault_password_file = vault.key
callback_whitelist = profile_tasks
retry_files_enabled = False
[ssh_connection]
ssh_args = -F ./ssh.cfg -o ControlMaster=auto -o ControlPersist=30m
control_path = ~/.ssh/ansible-%%r@%%h:%%p
@percygrunwald
percygrunwald / _table_of_contents.html
Last active Mar 27, 2019
Yet another Hugo partial for generating a Table of Contents
View _table_of_contents.html
{{ $headers := findRE "<h[2-4].*?>(.|\n])+?</h[2-4]>" .Content }}
{{ $numHeaders := len $headers }}
{{ $hasHeaders := ge $numHeaders 1 }}
{{ if $hasHeaders }}
<nav id="toc" data-toggle="toc">
<!-- TOC header -->
<h4 class="text-muted toc-heading">Table of Contents</h4>
<ol class="toc">
{{ range $i, $header := $headers }}
@percygrunwald
percygrunwald / scout_apm_absinthe_plug.ex
Last active May 21, 2019
Scout Absinthe (GraphQL) Instrumentation
View scout_apm_absinthe_plug.ex
defmodule ScoutApm.Absinthe.Plug do
alias ScoutApm.Internal.Layer
require Logger
@error_prefix "GraphQL query document could not be parsed"
@endpoint_prefix "GraphQL"
@default_action_name "unknown"
def init(default), do: default
You can’t perform that action at this time.