Skip to content

Instantly share code, notes, and snippets.

@haus
haus / calc.rb
Last active February 12, 2018 18:56 — forked from justinstoller/calc.rb
#!/usr/bin/env ruby
require 'csv'
require 'zlib'
path = ARGV[0]
hours = ARGV[1]
csv = nil
options = {col_sep: "\t"}
wget https://apt.puppet.com/puppetlabs-release-pc1-trusty.deb
sudo dpkg -i puppetlabs-release-pc1-trusty.deb
sudo apt-get update
#!/bin/bash
if [ -z "$1" ]; then
echo "Need a test file as an argument."
exit 1
fi
tests=$(grep -e '(deftest' $1 | awk '{print $NF}')
ns=$(grep -e '(ns' $1 | awk '{print $NF}')
#!/usr/bin/js -i
require('/usr/local/lib/node_modules/shelljs/global');
var repl = require('repl');
repl.start({terminal: true});
@haus
haus / gist:6144109
Created August 2, 2013 22:52
/etc/yum.repos.d/puppetlabs.repo
[puppetlabs-products]
name=Puppet Labs Products El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1
priority=1
[puppetlabs-deps]
name=Puppet Labs Dependencies El 6 - $basearch
gpg --list-keys --with-fingerprint
/root/.gnupg/pubring.gpg
------------------------
pub 4096R/4BD6EC30 2010-07-10 [expires: 2016-07-08]
Key fingerprint = 47B3 20EB 4C7C 375A A9DA E1A0 1054 B7A2 4BD6 EC30
uid Puppet Labs Release Key (Puppet Labs Release Key) <[email protected]>
/etc/apt/trusted.gpg.d//puppetlabs-keyring.gpg
----------------------------------------------
name 'user-module'
version %x{ git describe }.chomp
source 'git://github.com/user/module'
author 'user'
license 'Apache 2.0'
summary 'stuff'
description 'stuff'
diff --git a/lib/facter/util/ec2.rb b/lib/facter/util/ec2.rb
index 197a5c9..90368e9 100644
--- a/lib/facter/util/ec2.rb
+++ b/lib/facter/util/ec2.rb
@@ -40,8 +40,10 @@ module Facter::Util::EC2
if Facter.value(:kernel) == 'windows'
arp_command = "arp -a"
mac_address.gsub!(":","-")
- else
+ elsif Facter.value(:kernel) == 'linux'
diff rtyler-puppet-0.0.1/Gemfile rtyler-puppet-0.0.1-haus/Gemfile
3a4,5
> gem 'rspec-puppet'
> gem 'puppet-lint'
6,14c8
<
< group :test do
< gem 'rspec-puppet'
< gem 'puppet-lint'
< gem 'blimpy'
for just puppet agents:
in file /etc/apt/preferences.d/00-puppet.pref ...
Package: puppet puppet-common
Pin: version 2.7*
Pin-Priority: 501
for puppet agent and master:
in file /etc/apt/preferences.d/00-puppet.pref ...