Thursday, March 28, 2013

Ruby: Get Value from Collection

    TITLETYPE = [['Prof.', '4'],    ['Dr.', '3'],    ['Mrs.', '2'],    ['Ms.', '1'],    ['Mr.', '0']]
    
    TYTLETYPEHASH = Hash[TYTLETYPE]  
    TYTLEHASH.key('1') # => 'Ms.' 

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...