Skip to content

Instantly share code, notes, and snippets.

@derektamsen
derektamsen / puppet_master_crl_cache_update
Last active August 6, 2017 00:22
This script will connect to the rest api of the puppetca listed in your puppet config and update the local copy certificate revocation list. This is useful when you have distributed puppet masters fronted by a webserver and passenger.
#!/usr/bin/env bash
# This script will connect to the rest api of the puppetca listed in your
# puppet config and update the local copy certificate revocation list.
#
# This is useful when you have distributed puppet masters fronted by
# a webserver and passenger.
#
# https://docs.puppetlabs.com/guides/rest_api.html#certificate-revocation-list
# https://ask.puppetlabs.com/question/3843/multiple-puppet-masters-with-single-ca-server/
@derektamsen
derektamsen / fibonacci_squence.py
Last active August 29, 2015 13:56
Produces the nth position of the Fibonacci Squence
#!/usr/bin/env python
# Call this script with a number after the script name and it will produce the nth position in the Fibonacci sequence.
# http://www.math.rutgers.edu/~erowland/fibonacci.html
# function fib(n) => return the nth number in fibonacci sequence
# 0, 1, 1, 2, 3, 5, 8