Skip to content

Instantly share code, notes, and snippets.

View binarydev's full-sized avatar

Jose Santiago binarydev

View GitHub Profile
@binarydev
binarydev / keybase.md
Created October 22, 2018 19:55
keybase verification

Keybase proof

I hereby claim:

  • I am binarydev on github.
  • I am binarydev (https://keybase.io/binarydev) on keybase.
  • I have a public key ASAVDYbDivl4KW2YOYB4UGbMdLZlR2fJ1eDm8eMhxt8rNwo

To claim this, I am signing this object:

@binarydev
binarydev / json_utilities.rb
Last active October 15, 2023 21:08
Ruby - JSON Equality Check
module JsonUtilities
# compares two json objects (Array, Hash, or String to be parsed) for equality
def compare_json(json1, json2)
# return false if classes mismatch or don't match our allowed types
unless((json1.class == json2.class) && (json1.is_a?(String) || json1.is_a?(Hash) || json1.is_a?(Array)))
return false
end
# initializing result var in the desired scope