Skip to content

Instantly share code, notes, and snippets.

@SHyx0rmZ
Created October 25, 2017 21:23
Show Gist options
  • Select an option

  • Save SHyx0rmZ/41d4295c24a09ef2fa48d8ccfba1baa4 to your computer and use it in GitHub Desktop.

Select an option

Save SHyx0rmZ/41d4295c24a09ef2fa48d8ccfba1baa4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'json';F=%w{data input};H=File.read($0);#F.map!{|x|"#{x}s"}
y=H[29...33];t='%s.%s';F.map!{#"eval"#{eval"#{:eval}"}";Array[*y*t]
|_|eval"#{y.upcase}.load '#{eval"#{H[54...63]} '#{t%[_,y]}'"}'"}#_#
a=Array[*F[0]][0];V=t.gsub(/\./,'_')%[a[0][0..6],a[1][0].keys[0]]#m
I=H[20...27];define_method(:m){|q,_,o,_,p|;eval"#{I} 'date'"#{I} "!
k=p[0][0..8];x=F[1]["#{k}s"]*p[1];h,d=o[1],_[1];*s,_=F[1].to_a#2**5
s,e=s.map{|_|DateTime.parse _[1]};j=(e-s).to_i;i=(3.0*(e-s-j)*2**5)
x+=(d.eql?(250)?1500:2*h+5*d+i.to_i+d);{V=>q[1],#Date.new(j-s-e)*24
:"total_#{p[0][10..-1]}"=>x}};r=a[1].map{|👿|m(*👿)}#{a:"SHyx0rmZ"}
puts JSON.pretty_generate(:"#{I.gsub(/q/,'s')[0...4]}lts"=>r)#ruby!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment