Skip to content

Instantly share code, notes, and snippets.

View Keybase Proof
### Keybase proof
I hereby claim:
  * I am cinderhaze on github.
  * I am cinderhaze ( on keybase.
  * I have a public key ASAdsfUAZZfbqviN1-IW74AA1krlagOAL_8LQBoRrtgcngo
To claim this, I am signing this object:
Cinderhaze / hosttest_spec.rb
Created Jan 11, 2017
Example of testing an individual element of an array from a parameter of a resource in rspec-puppet
View hosttest_spec.rb
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 => '',
host_aliases => [ 'foo1.local', 'foo2.local' ],
Cinderhaze / hello_world.rb
Created Jan 1, 2017
Trying to get started with ruby hello_world.
View hello_world.rb
class HelloWorld
def hello()
'Hello, World!'
Cinderhaze / gist:1840ba98712d6b0e74a01cf6fab5100c
Last active Dec 6, 2016
Error while doing an rvm install ruby-2.3.3 --binary on OS X with RVM
View gist:1840ba98712d6b0e74a01cf6fab5100c
192:adventofcode cinderhaze$ rvm install ruby-2.3.3 --binary
Searching for binary rubies, this might take some time.
Found remote file
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 / output
Created Oct 15, 2016
How to pretty-print hashes and arrays for puppet debugging
View output
ubuntu@ubuntu:~$ puppet apply pretty.pp [12/46]
Notice: Scope(Class[main]): {one => 1, two => [dos, 2]}
Notice: Scope(Class[main]):
"one": "1",
"two": [
Cinderhaze / DockerOutput
Created May 5, 2016
Docker Output installing puppet-agent
View DockerOutput
usr@ubuntu:~$ docker run -ti centos:6.6 /bin/bash
Unable to find image 'centos:6.6' locally
6.6: Pulling from library/centos
a3ed95caeb02: Already exists
35d9d5d11536: Pull complete
Digest: sha256:cca50b07742e20c386025f231b5667b5051603e4f8e656da6442a39c0b96e680
Status: Downloaded newer image for centos:6.6
[root@649d1ea68df1 /]# sudo rpm -Uvh
bash: sudo: command not found
[root@649d1ea68df1 /]# rpm -Uvh
View Dockerfile
FROM ubuntu:15.10
RUN apt-get update && apt-get install -y \
build-essential \
git \
libxml2 libxml2-dev libxslt1-dev \
ruby2.2 \
ruby2.2-dev \
Cinderhaze / gist:4a2cb165890e90359404
Created Feb 6, 2016
Error output from shell provisioner
View gist:4a2cb165890e90359404
==> default: Running provisioner: shell...
default: Running: /var/folders/fk/pjhgc92d7f9ctbfg50x2x7wc0000gp/T/
==> default: stdin: is not a tty
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: wget is already the newest version.
==> default: 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
==> default: Err trusty InRelease
==> default:
Cinderhaze / tempPublish.h
Created Nov 9, 2015
Working example for photon
View tempPublish.h
// Use this include for the Web IDE:
#include "OneWire/OneWire.h"
// Use this include for Particle Dev where everything is in one directory.
// #include "OneWire.h"
// This library can be tested on the Core/Photon by running the below
// DS18x20 example from PJRC:
// OneWire DS18S20, DS18B20, DS1822 Temperature Example
Cinderhaze / gist:1d9cab83af6255e22b14
Created Sep 24, 2015
Not sure about the rubygem20-aws-sdk package on aws
View gist:1d9cab83af6255e22b14
[ec2-user@ip-172-31-44-96 modules]$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
jmespath (1.1.3)
json (1.8.2)
nokogiri (1.6.1)
psych (2.0.0)
rdoc (4.1.0)