Skip to content

Instantly share code, notes, and snippets.

@udzura
Last active August 29, 2015 13:56
Show Gist options
  • Save udzura/9045591 to your computer and use it in GitHub Desktop.
Save udzura/9045591 to your computer and use it in GitHub Desktop.
ヒューマット
Humat {
  is_a = Humane format
}

Basic

Token {
  id = 1234,
  key = hogehoge,
  secret = 'fugafuga',
}

One liner

Token{id=1234,key=hogehoge,secret=fuga fuga}

Nested data (using reference)

User {
  name = udzura,
  address => Address#udzura,
}

Address#udzura {
  zip = 123-4567,
  prefecture = Saitama,
  city = Ikebukuro,
}

Data with comment

/* commented */
User {
  // inline
  name = Uchio KONDO,
}

When the data is big

User {
  name = Uchio,
  icon_data = <<DATA1>>,
}

====
DATA1:
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDB
kSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBD
AQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
...
====
DATA2:
....

Line break is generally ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment