This file contains 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
<script> | |
(function($){ | |
$.fn.truncate = function(options) { | |
var defaults = { | |
length: 330, | |
minTrail: 0, | |
ellipsisText: "..." | |
}; | |
var options = $.extend(defaults, options); |
This file contains 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
# Defining the keys | |
def current_key | |
key(Time.now.strftime("%M")) | |
end | |
def keys_in_last_5_minutes | |
now = Time.now | |
times = (0..5).collect {|n| now - n.minutes } | |
times.collect{ |t| key(t.strftime("%M")) } |