This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v5.20; | |
use warnings; | |
use experimental qw( signatures ); | |
use Benchmark::Dumb qw( cmpthese ); | |
use Crypt::URandom (); | |
use Sys::GetRandom (); | |
use Sys::GetRandom::PP (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BuiltinFunctions::ProhibitBooleanGrep | |
BuiltinFunctions::ProhibitStringyEval | |
BuiltinFunctions::ProhibitStringySplit | |
BuiltinFunctions::ProhibitUniversalCan | |
BuiltinFunctions::ProhibitUniversalIsa | |
ClassHierarchies::ProhibitExplicitISA | |
ControlStructures::ProhibitMutatingListFunctions | |
ControlStructures::ProhibitUnreachableCode | |
ErrorHandling::RequireCarping | |
InputOutput::ProhibitBarewordFileHandles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
co = checkout | |
di = diff | |
st = status | |
sh = show | |
ci = commit | |
br = branch | |
cp = cherry-pick | |
last = show -1 HEAD | |
unstage = reset HEAD -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Puppet::Parser::Functions | |
newfunction(:puppet_config, :type => :rvalue, :doc => <<-EOS | |
This function queries Puppet configuration files. | |
*Examples:* | |
puppet_config('/etc/puppetlabs/installer/answers.install', 'q_install') | |
Will return: 'y' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo puppet agent -t --evaltrace \ | |
| grep --color=never 'Evaluated in \(.\+\) seconds' \ | |
| sed -e 's/Info: \(.\+\): Evaluated in \(.\+\) seconds/\2 \1/' \ | |
| sort -rn \ | |
| head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hostname=$1 | |
command=`basename $0` | |
if [ -z "${hostname}" ]; then | |
echo Usage: ${command} hostname | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.10.1; | |
use strict; | |
use warnings; | |
use Try::Tiny; | |
use YAML::Any qw/ LoadFile /; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# This is a Perl version of the monit_parser from | |
# https://github.com/munin-monitoring/contrib/blob/master/plugins/monit/monit_parser | |
use v5.10.1; | |
use strict; | |
use warnings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.10.1; | |
use strict; | |
use warnings; | |
use Data::Dump 'dump'; | |
use JSON::MaybeXS; |