Skip to content

Instantly share code, notes, and snippets.

@Cinderhaze
Cinderhaze / output
Created October 15, 2016 15:43
How to pretty-print hashes and arrays for puppet debugging
ubuntu@ubuntu:~$ puppet apply pretty.pp [12/46]
Notice: Scope(Class[main]): {one => 1, two => [dos, 2]}
Notice: Scope(Class[main]):
{
"one": "1",
"two": [
"dos",
"2"
]
}
@Cinderhaze
Cinderhaze / gist:1840ba98712d6b0e74a01cf6fab5100c
Last active December 6, 2016 00:58
Error while doing an rvm install ruby-2.3.3 --binary on OS X with RVM
192:adventofcode cinderhaze$ rvm install ruby-2.3.3 --binary
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/osx/10.11/x86_64/ruby-2.3.3.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system....
Installing required packages: autoconf, automake, libtool, libksba....
==> Upgrading 4 outdated packages, with result:
libyaml 0.1.7, openssl 1.0.2j, pkg-config 0.29.1_2, readline 7.0.1
==> Upgrading libyaml
@Cinderhaze
Cinderhaze / hello_world.rb
Created January 1, 2017 18:26
Trying to get started with ruby hello_world.
class HelloWorld
def hello()
'Hello, World!'
end
end
@Cinderhaze
Cinderhaze / hosttest_spec.rb
Created January 11, 2017 02:11
Example of testing an individual element of an array from a parameter of a resource in rspec-puppet
require 'spec_helper'
describe 'hosttest' do
context 'with default values for all parameters' do
context 'With foo.local host pre_condition' do
let(:pre_condition) {"
host { 'foo.local':
ip => '1.2.3.4',
host_aliases => [ 'foo1.local', 'foo2.local' ],
}
@Cinderhaze
Cinderhaze / Keybase Proof
Created December 10, 2017 20:24
Keybase Proof
### Keybase proof
I hereby claim:
  * I am cinderhaze on github.
  * I am cinderhaze (https://keybase.io/cinderhaze) on keybase.
  * I have a public key ASAdsfUAZZfbqviN1-IW74AA1krlagOAL_8LQBoRrtgcngo
To claim this, I am signing this object: