Skip to content

Instantly share code, notes, and snippets.

View percygrunwald's full-sized avatar

Percy Grunwald percygrunwald

View GitHub Profile
@percygrunwald
percygrunwald / ansible.cfg
Last active January 15, 2019 04:39
My Default `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 August 18, 2019 12:41
Yet another Hugo partial for generating a Table of Contents
{{ $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 January 5, 2021 00:12
Scout Absinthe (GraphQL) Instrumentation
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
@percygrunwald
percygrunwald / cloudSettings
Last active September 7, 2021 01:26
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-09-07T01:26:03.389Z","extensionVersion":"v3.4.3"}