Skip to content

Instantly share code, notes, and snippets.

View nhinds's full-sized avatar

Nicholas Hinds nhinds

View GitHub Profile
@nhinds
nhinds / Makefile
Created November 8, 2017 17:37 — forked from joostd/Makefile
Use xmllint to validate SAML 2.0 metadata (or similarly, any other SAML document) using an XML Catalog file
all: saml-2.0-os xsd/xenc-schema.xsd xsd/xmldsig-core-schema.xsd xsd/xml.xsd xcatalog/saml-metadata.xml
saml-2.0-os:
mkdir -p saml-2.0-os
wget http://docs.oasis-open.org/security/saml/v2.0/saml-2.0-os.zip
unzip -d saml-2.0-os saml-2.0-os.zip *.xsd
xcatalog/saml-metadata.xml:
mkdir -p xcatalog
xmlcatalog --noout --create xcatalog/saml-metadata.xml
@nhinds
nhinds / keybase.md
Created August 6, 2016 20:17
keybase.io proof

Keybase proof

I hereby claim:

  • I am nhinds on github.
  • I am nhinds (https://keybase.io/nhinds) on keybase.
  • I have a public key ASCprbD72aQZyPmzt9MjN4y_XVckbWoPFpJkhAEfnV5z7Ao

To claim this, I am signing this object:

@nhinds
nhinds / exported_resources.rb
Created October 3, 2015 06:51
Rspec-puppet support library for testing exported resources
# require Puppet::Resource::Catalog::Compiler
require 'puppet/indirector/catalog/compiler'
# Magic to add a catalog.exported_resources accessor
class Puppet::Resource::Catalog::Compiler
alias_method :filter_exclude_exported_resources, :filter
def filter(catalog)
filter_exclude_exported_resources(catalog).tap do |filtered|
# Every time we filter a catalog, add a .exported_resources to it.
filtered.define_singleton_method(:exported_resources) do
@nhinds
nhinds / aether.php
Created June 6, 2015 02:17
Genesis 1
<?php
define('BEGINNING',0);
define('FIRST_DAY',24*60*60);
define('SECOND_DAY',2*24*60*60);
define('THIRD_DAY',3*24*60*60);
define('FOURTH_DAY',4*24*60*60);
define('FIFTH_DAY',5*24*60*60);
define('SIXTH_DAY',6*24*60*60);
define('void',null);