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
@ECHO OFF | |
SET DEVKIT_BASEDIR=C:\Program Files\Puppet Labs\DevelopmentKit | |
SET RUBY_DIR=%DEVKIT_BASEDIR%\private\ruby\2.4.5 | |
SET SSL_CERT_FILE=%DEVKIT_BASEDIR%\ssl\cert.pem | |
SET SSL_CERT_DIR=%DEVKIT_BASEDIR%\ssl\certs | |
if "%ConEmuANSI%"=="ON" ( | |
"%RUBY_DIR%\bin\ruby" -S -- "%RUBY_DIR%"\bin\pdk %* | |
) else ( | |
"%DEVKIT_BASEDIR%\private\tools\bin\ansicon.exe" "%RUBY_DIR%\bin\ruby" -S -- "%RUBY_DIR%\bin\pdk" %* |
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
# declare a resource | |
user{'corey': ensure => present } | |
# ensure resource will check if resource exist | |
ensure_resource('user', 'corey', {'ensure' => 'present'}) | |
# now the oppesite order | |
reset | |
ensure_resource('user', 'corey', {'ensure' => 'present'}) | |
user{'corey': ensure => present } |
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
include nodejs | |
# show all resources starting with the word node | |
ls node |
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 ruby | |
# Author: NWOPS, LLC <[email protected]> | |
# Purpose: Vaiidate the git urls and branches, refs, or tags in the Puppetfile | |
# Date: 1/14/19 | |
# exits with 1 if Puppetfile is invalid, 0 otherwise | |
# Usage: ./check_puppetfile.rb [path_to_puppetfile] | |
# Example Output | |
# | |
# NAME | URL | REF | STATUS | |
# ---------|-----------------------------------------------|--------------------------------|------- |
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 ruby | |
require 'puppet' | |
require 'json' | |
require 'tmpdir' | |
require 'net/http' | |
require 'uri' | |
require 'puppet/configurer' | |
def retrieve_catalog |
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
{ | |
"title": "DevOps Consultant", | |
"bio": "Corey Osman is a longtime DevOps advocate and is the founder of a nimble software consulting company called NWOPS, LLC.\n Their mission is to forge tools and apps to help automate infrastructure, developer workflows and teach devops culture to large organizations. More recently Corey has invested time and money into the world of crypto currency by automating and writing tools where needed. \nIn his free time, Corey enjoys being temporarily trapped in a warm cabin on Mount Hood with plenty of food, beer, and snow.", | |
"links": [ | |
"https://www.nwops.io", "https://www.puppet-debugger.com", "https://logicminds.github.io", "http://www.blockops.party/" | |
] | |
} |
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
FROM ubuntu:18.04 | |
ARG GRAALVM_VERSION=1.0.0-rc4 | |
RUN DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive apt-get update && \ | |
apt-get install -y make gcc tzdata readline-common libreadline-dev locales llvm clang curl zlib1g-dev libssl-dev tree vim && \ | |
curl -Ls https://github.com/oracle/truffleruby/releases/download/vm-${GRAALVM_VERSION}/ruby-installable-ce-${GRAALVM_VERSION}-linux-amd64.jar -o /tmp/ruby-installable-ce-${GRAALVM_VERSION}-linux-amd64.jar && \ | |
curl -Ls "https://github.com/oracle/graal/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-${GRAALVM_VERSION}-linux-amd64.tar.gz" -o /usr/local/graalvm-ce-${GRAALVM_VERSION}-linux-amd64.tar.gz | |
RUN tar -zxf /usr/local/graalvm-ce-${GRAALVM_VERSION}-linux-amd64.tar.gz -C /usr/local && \ |
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
apt-get update | |
apt-get install -y curl wget git | |
if [[ ! -f /tmp/mineros_0.0.1-1_amd64.deb ]]; then | |
curl -o /tmp/mineros_0.0.1-1_amd64.deb https://s3.amazonaws.com/nwops-omnibus/ubuntu/14.04/x86_64/mineros_0.0.1-1_amd64.deb/mineros_0.0.1-1_amd64.deb | |
fi | |
dpkg -i /tmp/mineros_0.0.1-1_amd64.deb |
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 bash | |
breed=$PT_breed | |
if [[ $EUID -ne 0 ]]; then | |
pre_command='sudo ' | |
else | |
pre_command='' | |
fi | |
which tput >/dev/null 2>&1 |
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
$rvalue = [1,2,3].map |$key| { ["${key}blah"] } | |
$rvalue[0] =~ Array[String] |