Skip to content

Instantly share code, notes, and snippets.

View trlinkin's full-sized avatar

Thomas Linkin trlinkin

View GitHub Profile
@reidmv
reidmv / pe-pg_repack.md
Last active May 21, 2019 16:31
pe-pg_repack.md

Instructions for getting started with pg_repack in Puppet Enterprise:

NOTE: there are some PE version numbers in some of the code blocks. You'll need to update these to the correct numbers for your deployment.

To create an RPM package for pg_repack (using FPM):

First install the dependencies (requires root):

yum install pe-postgresql-devel zlib-devel readline-devel gcc -y
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import urllib2
import time
url = "http://localhost:8080/metrics/v1/mbeans/java.lang:type=Memory"
outputfile = "/var/log/puppetlabs/puppetdb/heap-usage.log"
@natemccurdy
natemccurdy / windows_dev_node.pp
Last active March 8, 2017 00:09
Bootstrap to make editing code on Windows better
# GETTING STARTED
# 1. Install the Puppet agent from http://downloads.puppetlabs.com/windows/puppet-agent-1.3.6-x64.msi
# 2. puppet module install chocolatey-chocolatey
# 3. puppet module install cyberious-apm
# 4. puppet apply windows_dev_node.pp
include chocolatey
$choco_packages = [
'git',
@ghetzel
ghetzel / gist:0e250ff0ff304c3a01b9
Last active August 29, 2015 14:08
SSL Command Cheat Sheet
# SSL Command Cheat Sheet
# PK ---------------------------------------------------------
# Generate a Private Key (4096 bits)
openssl genrsa -out ca.key 4096
# ...with passphrase
openssl genrsa -des3 -out ca.key 4096
#! /usr/bin/env ruby
require 'rubygems'
require 'sinatra/base'
require 'webrick'
#require 'webrick/https'
#require 'openssl'
require 'resolv'
require 'json'