Skip to content

Instantly share code, notes, and snippets.

@0x0dea

0x0dea/paku.rb Secret

Created September 8, 2015 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x0dea/f61a35b4f0b5f8100f99 to your computer and use it in GitHub Desktop.
Save 0x0dea/f61a35b4f0b5f8100f99 to your computer and use it in GitHub Desktop.
require 'date'
File.
open('/var/log/pacman.log').
grep(/-S -y -u/).
map(&DateTime.method(:parse)).
each_cons(2).
map { |a, b| b - a }.
max.to_f.display # => 2.9756944444444446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment