Skip to content

Instantly share code, notes, and snippets.

@todashuta
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save todashuta/988433036eb145d1eaf7 to your computer and use it in GitHub Desktop.

Select an option

Save todashuta/988433036eb145d1eaf7 to your computer and use it in GitHub Desktop.
~/bin/yaml-pp
#!/usr/bin/env ruby
require 'yaml'
require 'awesome_print'
if ARGV.empty? || ARGV.first == '-h' || ARGV.first == '--help'
puts "Usage: #{File.basename($0)} [yaml file]"
exit
end
ap YAML.load_file(ARGV[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment