Converting a Byte Array to a String in Ruby (1 mins read).
How to convert an array of bytes to a String with Ruby.
Converting a Byte Array to a String in Ruby (1 mins read).
How to convert an array of bytes to a String with Ruby.
Generating the Client Assertion JWT for private_key_jwt
Authentication with Ruby (1 mins read).
A helper script to generate the client assertion required to authenticate to an Authorization Server that supports private_key_jwt
, on the command-line with Ruby.
Verifying Signed JWTs (JWS) with Ruby (2 mins read).
Using the ruby-jwt library to verify a signed JSON Web Token (JWS) on the command-line.
Creating Signed JWTs (JWS) with Ruby (1 mins read).
Using the json-jwt and ruby-jwt libraries to sign a JSON Web Token on the command-line.
Generating JWK Thumbprints with Ruby (1 mins read).
How to generate JWK thumbprints with Ruby.
RuboCop Defaults Survey Results | Meta Redux
Recommended read: RuboCop Defaults Survey Results | Meta Redux https://metaredux.com/posts/2020/05/26/rubocop-defaults-survey-results.html
Extracting x5c
s from a JSON Web Key Set (JWKS) to PEM files with Ruby (1 mins read).
How to extract the full chain of certificates from a JWKS' x5c
parameter to files.
StrongVersions - Enforce a strict versioning policy in your Gemfile
Recommended read: StrongVersions - Enforce a strict versioning policy in your Gemfile https://github.com/bobf/strong_versions
Converting a Ruby Hash to a String (1 mins read).
The ways that we can convert a Hash to a String with Ruby.
Yukihiro Matsumoto: "Ruby is designed for humans, not machines"
Recommended read: Yukihiro Matsumoto: "Ruby is designed for humans, not machines" https://evrone.com/yukihiro-matsumoto-interview
Converting an x5c
from a JSON Web Key to a PEM with Ruby (1 mins read).
How to convert a JWK's x5c
to a PEM-formatted certificate with Ruby.
Parsing a Unix Epoch With Bash/Ruby on the Command-Line (1 mins read).
How to convert a Unix Epoch to a human-readable date format.
What makes type checking Ruby hard?
Recommended read: What makes type checking Ruby hard? https://blog.jez.io/ruby-mutation/
Using Bash to automate Rubocop fixes
Recommended read: Using Bash to automate Rubocop fixes https://krmannix.com/2019/12/12/using-bash-to-automate-rubocop-fixes/
Ruby Literals You May Not Know
Some interesting ones in here I'll look at using - escaping things is one of my biggest gripes with every language, so this is pretty nice
Recommended read: Ruby Literals You May Not Know https://citizen428.net/blog/ruby_literals_you_may_not_know/
Trusting Self-Signed Certificates from Ruby (1 mins read).
How to configure Ruby to trust self-signed certificates.
Pretty Printing YAML with the Ruby Command-Line (1 mins read).
Using Ruby's YAML
library to pretty-print YAML files from the command-line.
Minifying JSON with Ruby (1 mins read).
How to take a pretty-printed JSON string and replace it with a minifed JSON string using Ruby.
Recommended read: Go is the new Ruby https://00f.net/2019/10/28/go-is-the-new-ruby/
Converting Ruby Hash keys to Strings/Symbols (2 mins read).
How to recursively convert a Ruby Hash's keys to a String / Symbol.
Merging an 'Override' Ruby Hash into the Original Hash (6 mins read).
How to use Ruby to merge two hashes with nested arrays of hashes, with the second hash overriding values from the first.
Easily Parsing Failed Cucumber Scenarios from the JSON Report (2 mins read).
How to parse a Cucumber JSON report to display the failed scenarios and their causes.
Pretty Printing JSON Files Inline on the Command Line (2 mins read).
How to rewrite multiple JSON files inline on the Command Line.
URL Decoding with Ruby on the Command Line (1 mins read).
How to use Ruby's standard library to decode URLs with a handy one-liner.
Pretty Printing JSON with Ruby (1 mins read).
Using Kernel.jj
to pretty print Ruby objects as JSON objects.
Pretty Printing JSON Web Tokens (JWTs) on the Command Line using Ruby (3 mins read).
How to easily introspect and pretty print a signed JWT (JWS) or an encrypted JWT (JWE) on the command line using Ruby's standard library, or using the ruby-jwt external library.
Pretty Printing JSON on the Command Line with Ruby (1 mins read).
Using Ruby's JSON module to pretty print JSON objects from the command line.
Morsels of Goodness: What's Cooking in Chef 14? (5 mins read).
A look at the new features coming in the new Chef 14 release, as well as what to watch out for when upgrading.
Bundling Common Rake Tasks into a Gem (8 mins read).
An example of how to create a helper gem for common Rake task, using the real-world example of Chef cookbooks.
Verify a Ruby Class Method is Called with Arguments in Rspec, Without Doubles or Mocks (1 mins read).
Rspec code to verify that a Ruby Class Method is called from another method, without needing to mock anything.
Converting YAML to JSON and vice versa (Part 1 - Ruby) (2 mins read).
Coerce YAML to JSON and vice versa, from the comfort of your Gem-studded command line.