Skip to content

Instantly share code, notes, and snippets.

@cgoldberg
cgoldberg / merge_junit_results.py
Last active January 10, 2024 19:19
Merge multiple JUnit XML results files into a single results file.
#!/usr/bin/env python
"""Merge multiple JUnit XML results files into a single results file."""
# MIT License
#
# Copyright (c) 2012 Corey Goldberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@mpasternacki
mpasternacki / README.md
Last active January 18, 2018 10:56
A Continuous Packaging Pipeline: The Materials

A Continuous Packaging Pipeline

A list of tools mentioned in my Ignite talk from Devopsdays Rome 2012 on a continuous packaging pipeline, with links and short description for each tool.

The talk slides are at https://speakerdeck.com/mpasternacki/a-continuous-packaging-pipeline; a longer blog post will be written soon.

Vendorificator

Available at https://github.com/3ofcoins/vendorificator/ or with gem install vendorificator

Include third party modules in your git repo, using pristine branches to sanely maintain local changes, upgrades, and merges.

#!/bin/bash
#
# This is the script responsible for updating our Puppet master data,
# which includes modules, manifests, hiera data, etc. All of this data is
# managed in a git repository and upon "deploy" it is synced into the Puppet
# master.
#
# This script mirrors the remote git repository, looking for branches that
# match "env-*" (such as "env-production" or "env-test"). Each of these branches
# is setup as an environment into the Puppet master's data files. The
@actionjack
actionjack / tomcat.sh
Created September 20, 2012 14:06 — forked from valotas/tomcat.sh
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@linickx
linickx / gist:3692156
Created September 10, 2012 17:01
hubot init script for RHEL / CENTOS
#!/bin/bash
# hubot
# chkconfig: 345 20 80
# description: hubot
# processname: hubot
# REFERENCE: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/
# This script assumes you have a user called "hubot" on your system and that hubot is installed in /opt/hubot
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@reyjrar
reyjrar / logstash.conf
Created July 5, 2012 12:48
LogStash Configuration
input {
tcp {
type => "syslog"
port => 8514
}
}
filter {
## DISCARD IMPROPERLY FORMATTED MESSAGES
@rtyler
rtyler / gist:3041462
Created July 3, 2012 18:09
Rakefile for puppet-lint in CI
LINT_IGNORES = ['rvm']
namespace :lint do
desc "Check puppet module code style."
task :ci do
begin
require 'puppet-lint'
rescue LoadError
fail 'Cannot load puppet-lint, did you install it?'
end
@ollyg
ollyg / logstash.conf
Created June 20, 2012 13:29
logstash config and filter to fully parse a syslog message (PRI, timestamp, host)
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
@bentonporter
bentonporter / gist:2891463
Created June 7, 2012 20:51
Ruby - HMAC-SHA256 example
require 'openssl'
require 'Base64'
key = "secret-key"
data = "some data to be signed"
Base64.encode64(OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha256'), key, data)).strip()