How to get up and running with the ChefDK to perform common tests, such as unit tests and linting.
A directory structure I've found quite useful for writing ChefSpec tests for custom resources, by creating a fake cookbook within the cookbook you're testing.
Why you'd want a fat JAR for your Gatling tests and how you'd achieve it.
How to configure the bounds that Gatling marks your response times within for console output and graphing purposes.
Setting the default AWS profile when working with multiple profiles and the AWS CLI / SDKs.
Finding out that a
nil gets silently coerced to an empty
Hash if given to a custom resource's property of type
Noting the deprecation of using
ChefSpec::Coverage.start! when using Chef 14 and above.
The updated error message returned by a Chef
ValidationFailed error, when you're specifying which properties are
required on a custom resource.
How to convert an X.509 PEM file to a human-readable format using
How to convert an X.509 DER file to a human-readable format using
git cherry-pick to make it easier to backport or replay Git commits across different versions of your codebase.
Showing just response headers when
curling a resource, using
git push --force-with-lease=ref can save you from overriding others' changes on shared Git branches
Taking you through the journey I go on when writing blog posts, from ideation to publishing the post.
How to track changes to files in Git without pesky file renames getting in the way, using
git log --follow
Using the example of deploying and running a Java JAR file as a way to show the lifecycle of a fully test-driven Chef cookbook.
How to easily introspect and pretty print a JWT on the command line using Ruby's standard library, or using the ruby-jwt external library.
How to use
chef-shell to see attribute config and recipes, with and without a Chef Server.
Why you'd want a fat JAR and how you'd achieve it.
A look back at my journey up to now, the choices I've made, and what advice I have for others who are embarking on their own journeys into tech.
Using Ruby's JSON module to pretty print JSON objects from the command line.
How to merge multiple repositories, with their history, into a single repository, using the
git subtree add command
Reusing network sockets for speed and reduction of authentication handshakes with OpenSSH.
How to get nicer
diffs when working with submodules.
Why you should explicitly add
backup false when
file through Chef, to avoid leaving potentially sensitive files still on the box.
python -i to get an interactive REPL after running a Python source file.
Hitting the error
permission denied while trying to connect to the Docker daemon socket when trying to run
docker login as a non-root user in Chef.
Missing space after # and
Do not use block comments errors for your
knife-cookbook-doc formatted comments.
Testing implementation of a
ruby_block in ChefSpec, to ensure that the code executes as expected
Rspec code to verify that a Ruby Class Method is called from another method, without needing to mock anything.
Logger entries in autogenerated
README.mds for Chef 13
Preparing for breaking changes in Chef 14 by renaming
new_resource.property_name in Custom Resources.
A one-liner shell command to fix Rubocop errors
%w-literals should be delimited by [ and ].
Notes on the main problems encountered when upgrading from Chef 12 to Chef 13, both with ChefSpec and Rubocop.
block.block.call to trigger
ruby_blocks within ChefSpec 7 and Chef 13.
How to resolve the
Parenthesize the param render_file Rubocop error when upgrading your cookbook to Chef 13.
How to resolve the
Parenthesize the param lazy Rubocop error when upgrading your cookbook to Chef 13.
How to see Emoji when using the Dunst notification system.
Getting around the pesky
OpenSSL::SSL::SSLError SSLv2/v3 read server hello A error when running Berkshelf behind a proxy
How to get up and running with
service resources when running Test Kitchen with the Docker driver, in this example for use with GitLab CI.
How to get the ChefDK (and associated tools) to trust internal / self-signed certificates, in an easy oneliner.
How to handle getting an
EACCES when trying to run ChefSpec on a recipe.
How to best test
include_recipes within your Chef recipes, as well as how to ensure that you aren't running any dependent recipes in your tests.
Coerce YAML to JSON and vice versa, from the comfort of your Gem-studded command line.
Remove any merged local or branches from your local Git repository
Using Python's JSON module to pretty print JSON objects from the command line.
Making it easier to write commit messages by having the diff in your editor.
A quick one-liner to get you the full certificate chain in
I share the tool I have been using for system utilisation and monitoring,
Speed up your commit message writing by providing a template for when you run
A tool to help reduce the amount of unnecessary output when building LaTeX files.