Skip to content

Instantly share code, notes, and snippets.

@eputnam
eputnam / windows_ruby_setup.ps1
Last active April 9, 2018 13:09
windows_setup.ps1
# open internet explorer
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
iwr 'https://raw.githubusercontent.com/glennsarti/dev-tools/master/uber-ruby-installer.ps1' -UseBasicParsing | iex
# 2.3.1 (x64)
# $env:Path += ";C:\tools\ruby2.3.1\bin"
# gem install bundler
# git clone https://github.com/puppetlabs/puppetlabs-
@eputnam
eputnam / approved.rb
Last active February 13, 2018 21:18
approved script
require 'puppet-lint'
require 'json'
require 'rainbow/ext/string'
require 'git'
# client = Octokit::Client.new(:access_token => 'TOKEN')
repo = ARGV[0]
repo_name = repo.split("/").last.chomp(".git")
repo_user = repo.split("/")[-2]
tmpdir = Dir.mktmpdir

Classes

klass

Examples

This is an example
class { 'klass':
  param1 => 1,
  param3 => 'foo',
}
@eputnam
eputnam / gitbadge.rb
Created January 6, 2017 18:26
gitbadge.rb
#!/usr/bin/env ruby
#Creates sweet github badges to insert into JIRA tickets for PRs
#Usage:
# gitbadge https://github.com/puppetlabs/puppetlabs-acl/pull/90 https://github-shields.com/github/puppetlabs/puppetlabs-apache/pull/324.svg
url = ARGV
badges = []
url.each do |u|
s = u.split('.com')
#!/bin/bash
##Command line tool to make acceptance tests on vmpooler a little more bearable
##Author: Eric Putnam <eric.putnam@puppet.com>
function output {
PURPLE='\033[0;35m'
NC='\033[0m' # No Color
printf "${PURPLE}"$1"${NC}${2}"
}