hoodwink.d enhanced

Fri Mar 16

Register_closed

Winning is a feeling that you get.

Chad Fowler

Convert JSON to YAML for Syck

def convert_json_to_yaml(json) # Ensure that ":" and "," are always # followed by a space quoting, escaping = false, false json.gsub(/./) do |char| escaping = false and next char if escaping case char when '"', "'" quoting = quoting == char ? false : char when "\\" escaping = true if quoting when ":", "," char << " " unless quoting end char end end json = %({"returnTo":{"/categories":"/"}}) YAML.load(json) # ArgumentError: syntax error on line 0, col 30: `' YAML.load(convert_json_to_yaml(json)) # => {"returnTo"=>{"/categories"=>"/"}}

Michel Gondry solves a Rubik’s Cube with his nose


A response to accusations that he digitally manipulated the footage of him performing the feat with his feet