Skip to content

Instantly share code, notes, and snippets.

View bderickson's full-sized avatar

Brian Derickson bderickson

  • St Louis, Missouri
View GitHub Profile
@bderickson
bderickson / verbose output
Created April 14, 2014 18:08
Librarian-Puppet error when path contains spaces
> librarian-puppet version
librarian-puppet v1.0.0
> ruby --version
ruby 1.8.7 (2013-12-22 patchlevel 375) [x86_64-linux]
> librarian-puppet install
Unable to rollback path /tmp/librarian/with spaces/blah/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/stdlib/version/804879af3577ffc462dba2bf74cceb6b: Directory not empty - /tmp/librarian/with spaces/blah/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/stdlib/version/804879af3577ffc462dba2bf74cceb6b
Error executing puppet module install:
puppet module install --version 4.1.0 --target-dir /tmp/librarian/with spaces/blah/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/stdlib/version/804879af3577ffc462dba2bf74cceb6b --module_repository http://forge.puppetlabs.com --modulepath /tmp/librarian
#!/usr/bin/env ruby
forge "http://forge.puppetlabs.com"
mod "apt",
:git => "https://github.com/bderickson/puppetlabs-apt",
:ref => "00221522dc7546c9b01f199641be52ba62fb5285"
mod "jenkins",
:git => "git://github.com/jenkinsci/puppet-jenkins.git",
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
@bderickson
bderickson / bderickson:stdlib_version
Last active August 29, 2015 13:56
installing puppetboard with librarian-puppet 0.9.10
> librarian-puppet version
librarian-puppet v0.9.10
> gem list librarian-puppet
*** LOCAL GEMS ***
librarian-puppet (0.9.10)
> cat Puppetfile
forge "http://forge.puppetlabs.com"
@bderickson
bderickson / indexer.conf
Last active December 24, 2015 01:09
Email output plugin for Logstash 1.2.1
input {
redis {
host => 'logstash-dev.gsc.wustl.edu'
type => 'redis-input'
data_type => 'list'
key => 'logstash'
codec => 'json'
}
}
@bderickson
bderickson / BAMCoverage.java
Created November 2, 2012 15:45
Reducer implementation using GenericRecord as output instead of Pair
public static class AvroBamCoverageReducer
extends AvroReducer<String, Integer, GenericRecord> {
public void reduce(String key, Iterator<Integer> values,
AvroCollector<GenericRecord> collector, Reporter reporter)
throws IOException {
int sum = 0;
while(values.hasNext()) {
Integer value = values.next();
sum += value.intValue();
@bderickson
bderickson / Avro Reducer
Created November 1, 2012 21:49
Avro Reducer that fails with "No field named chromosome in: null"
public static class AvroBamCoverageReducer
extends AvroReducer<String, Integer, Pair<GenericRecord, Integer>> {
public void reduce(String key, Iterator<Integer> values,
AvroCollector<Pair<GenericRecord, Integer>> collector, Reporter reporter)
throws IOException {
int sum = 0;
while(values.hasNext()) {
Integer value = values.next();
sum += value.intValue();