Skip to content

Instantly share code, notes, and snippets.

# field allowed values
# ----- --------------
# .-------------- minute 0-59
# | .----------- hour 0-23
# | | .-------- day of month 1-31
# | | | .----- month 1-12 (or names, see below)
# | | | | .-- day of week 0-7 (0 or 7 is Sun, or use names)
# | | | | |
users = {
'jeff4' => { 'uid' => 4, 'gid' => 23, 'gecos' => 'Jeff Buechler' },
'jeff5' => { 'uid' => 5 },
'jeff6' => { 'uid' => 6 },
'jeff1' => { 'uid' => 1 },
'scott' => { 'uid' => 7 },
'jeff2' => { 'uid' => 2 },
'jeff3' => { 'uid' => 3 },
}
# An example of using ruby to read a YAML file into a set of ruby objects (hashes, in this example):
# I added newlines between the irb commands for legibility's sake.
woods@beidleheimer ~/src/git/bus (master)↑ $ cat config/database.yml
development:
adapter: postgresql
host: localhost
username: bus
database: bus_development