Skip to content

Instantly share code, notes, and snippets.

View doertedev's full-sized avatar

Stefan Staudenmeyer doertedev

View GitHub Profile
@doertedev
doertedev / .gitconfig
Created July 30, 2020 12:17
Configure git to list PRs as branches once pulled
```
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
```
@doertedev
doertedev / xml_css.rb
Created June 20, 2017 19:37
XML / CSS resource selector for Inspec
require 'nokogiri'
require 'utils/simpleconfig'
class XML_CSS < Inspec.resource(1)
name 'xml_css'
desc 'XML for Chef Inspec using Nokogiri\'s CSS selector feature'
example '
Given this set of XML:
@doertedev
doertedev / urandgen
Created September 17, 2015 09:33
/dev/urand as a password generator
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Please provide a length (e.g. \`urandgen 40\`)!";
exit 1;
fi
# I rather use the whole list of characters and add/remove one by hand then to screw around with a-zA-Z9-9...
cat /dev/urandom | tr -dc 'qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM1234567890,.-;:_!@§$%&/()=?`*+' | head -c $1
echo ""