Skip to content

Instantly share code, notes, and snippets.

View croddy's full-sized avatar

Chris Roddy croddy

View GitHub Profile
@hsnodgrass
hsnodgrass / cd4pe_pipeline_patterns.md
Created December 18, 2019 23:10
CD4PE Pipeline Patterns

CD4PE Pipeline Patterns and Strategies

Recently, a few of us PSEs got together to have a deep dive into CD4PE and see if we could take some of the workflows we've seen from customers and convert them to CD4PE. We've identified a few different patterns and stragtegies and would like input on their validity, supportability, and how well they adhere to CD4PE's intended usage.

Master pipeline, feature pipeline

  • This is the most basic pattern we have, and the one we are expecting to deliver as part of a standard jumpstart.
  • Consists of two pipelines, Master and Regex.
    • Master:
      • Source is master branch in control repo
      • Triggered via commit pull requests and commits.
  • Default code validation and impact analysis stages.
@hsnodgrass
hsnodgrass / cis1809.pp
Last active April 10, 2020 20:46
Example CIS benchmark Puppet manifest
# An example of using https://github.com/ayohrling/local_security_policy
# to enforce a CIS benchmark against a windows host.
# The `tags` parameter is a good spot to put things like CIS profile,
# benchamark number, controls, or any other metadata about the policy
# you or an auditor would like to see. More info about tags:
# https://puppet.com/docs/puppet/latest/lang_tags.html
# 1.1.1
local_security_policy { 'Enforce password history':
ensure => present,
policy_value => 24,
@natemccurdy
natemccurdy / autosign.rb
Created October 6, 2017 21:33
Puppet policy-based autosign script: pre-shared key
#!/opt/puppetlabs/puppet/bin/ruby
#
# A note on logging:
# This script's stderr and stdout are only shown at the DEBUG level
# of the master's logs. This means you won't see the error messages
# in puppetserver.log by default. All you'll see is the exit code.
#
# https://docs.puppet.com/puppet/latest/ssl_autosign.html#policy-executable-api
#
# Exit Codes:
@ion1
ion1 / default.pa
Last active August 18, 2021 18:21
PulseAudio “night mode” (high-pass filter and limiter) for ~/.pulse/default.pa
.include /etc/pulse/default.pa
load-module module-ladspa-sink sink_name=ladspa_limiter sink_properties=device.description="Limiter" master=alsa_output.pci-0000_00_14.2.analog-stereo plugin=fast_lookahead_limiter_1913 label=fastLookaheadLimiter control=12,0,2
load-module module-ladspa-sink sink_name=ladspa_eq sink_properties=device.description="Equalizer\ and\ Limiter" master=ladspa_limiter plugin=mbeq_1197 label=mbeq control=-24,-24,-24,0,0,0,0,0,0,0,0,0,0,0,0
set-default-sink ladspa_eq
@bigjust
bigjust / gist:1302723
Created October 20, 2011 23:44
Y U NO REPLICATE SOLR???
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@sshirokov
sshirokov / switch.py
Created September 20, 2011 15:26
Oh my god why the hell would anyone use this seriously. (They aren't, so don't)
return {True: a}.get(something == something_else,
{True: c}.get(is_something(),
{True: b}.get(rofl != copter,
c))) # Default