This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl s_client -host $(puppet config print server) -port 8140 -cert $(puppet config print certdir)/$(puppet config print certname).pem -key $(puppet config print privatekeydir)/$(puppet config print certname).pem -CAfile $(puppet config print certdir)/ca.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| del /S/Q c:\ProgramData\PuppetLabs\puppet\etc\ssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # polipo daemon configuration | |
| # /etc/config/polipo | |
| config 'polipo' 'daemon' | |
| # daemonise polipo (fork in background) | |
| option 'daemonise' '1' | |
| # where polipo will store its process pid | |
| option 'pidFile' '/var/run/polipo.pid' | |
| config 'polipo' 'general' | |
| option 'enabled' '1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ENV_DIR=/etc/puppetlabs/code/environments/production | |
| MOD_DIR=$ENV_DIR/modules | |
| which r10k || gem install r10k | |
| # link system.yaml (lowmem settings + disable code manager) to where puppet | |
| # expects to be able to find them, otherwise code manager will be enabled after | |
| # and memory will spike after running this script | |
| if [ ! -s /system.yaml ] ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Ask systemctl to do something with puppet services | |
| if [ -z "$1" ] ; then | |
| echo "must be run with an argument for systemct" | |
| exit 1 | |
| fi | |
| systemctl $1 puppet | |
| systemctl $1 mcollective | |
| systemctl $1 pxp-agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import textwrap | |
| def format_header(date, user): | |
| output = "<tr><td>{date}</td><td>{user}</td><td><pre>".format( | |
| date=date, | |
| user=user, | |
| ) | |
| return output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import random | |
| import re | |
| import argparse | |
| parser = argparse.ArgumentParser(description="Generate names from wordlist") | |
| parser.add_argument('--wordlist', default='wordlist', help='wordlist file to read') | |
| parser.add_argument('--iterations', default=100, type=int, help='how many words to generate?') | |
| parser.add_argument('--words', default=3, type=int, help='how many words to fuse together') | |
| parser.add_argument('--min', default=2, type=int, help='min letters to pick from word') | |
| parser.add_argument('--max', default=4, type=int, help='max letters to pick from word') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'yaml' | |
| Facter.add(:myfact) do | |
| setcode do | |
| YAML.load(Facter::Core::Execution.exec("/usr/local/bin/mycoolscript.pl")) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class profile::docker { | |
| include docker | |
| $image = "mongo" | |
| docker::image { $image: } | |
| docker::run { $image: | |
| image => $image, | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filename = "catalog.bad" | |
| i = 0 | |
| with open(filename, 'rb') as f: | |
| while 1: | |
| byte_s = f.read(1) | |
| if not byte_s: | |
| break | |
| try: | |
| u = unicode(byte_s, "utf-8") |