Skip to content

Instantly share code, notes, and snippets.

View JakeTRogers's full-sized avatar

Jake Rogers JakeTRogers

View GitHub Profile
@JakeTRogers
JakeTRogers / puppet.json
Created May 13, 2019 18:04
Visual Studio Code Puppet Class Skeleton
"Class Header": {
"prefix": "classheader",
"body": [
"# @summary ${1:A short summary of the purpose of this class}",
"#",
"# @example",
"# include ${2}${TM_FILENAME_BASE}",
"#",
"# @param ${3:foo}",
"# ${4:Explanation of what this parameter affects.}",
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""join csv data in much the way an excel vlookup would, but smarter"""
import argparse # argument parsing
import csv # parse CSV files
import logging # logging for file/email
import sys # used to exit script
from collections import OrderedDict # preserve dictionary order
@JakeTRogers
JakeTRogers / Guardfile
Last active October 24, 2017 00:50
puppet guard
notification :off
guard :shell do
watch %r{^(manifests|site\/(profile|role)\/manifests)\/(.+)\.pp$} do
system("pdk validate puppet") and system("pdk test unit")
end
watch %r{^(lib|site\/(profile|role)\/lib)\/(.+)\.rb$} do
system("pdk validate ruby") and system("pdk test unit")
end
watch %r{^spec\/(classes|defines|applications|functions|types|type_aliases|hosts)\/(.+)\.rb$} do