This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
# This was formally known as [safe_mysqld]. Both versions are currently parsed. | |
[mysqld_safe] | |
socket = /var/run/mysqld/mysqld.sock | |
nice = 0 | |
syslog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# expects seconds, returns pretty string of how long ago event happened | |
def ago(seconds) | |
a = seconds | |
case a | |
when 0 then "just now" | |
when 1 then "a second ago" | |
when 2..59 then a.to_s+" seconds ago" | |
when 60..119 then "a minute ago" #120 = 2 minutes | |
when 120..3540 then (a/60).to_i.to_s+" minutes ago" | |
when 3541..7100 then "an hour ago" # 3600 = 1 hour |
NewerOlder