unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
blob 53d68ce4a03e63b47170127246f85507b7d508cc 373 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 
#!/usr/bin/env ruby
# -*- encoding: binary -*-
# Reads from stdin and outputs the SHA1 hex digest of the input

require 'digest/sha1'
$stdout.sync = $stderr.sync = true
$stdout.binmode
$stdin.binmode
bs = 16384
digest = Digest::SHA1.new
if buf = $stdin.read(bs)
  begin
    digest.update(buf)
  end while $stdin.read(bs, buf)
end

$stdout.syswrite("#{digest.hexdigest}\n")

debug log:

solving 53d68ce ...
found 53d68ce in https://yhbt.net/unicorn.git/

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).