Skip to content

Instantly share code, notes, and snippets.

@scalone
Created August 19, 2014 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save scalone/98ddc0371db82cb8c37a to your computer and use it in GitHub Desktop.
Save scalone/98ddc0371db82cb8c37a to your computer and use it in GitHub Desktop.
f = File.open("recibo1.jpg")
f.each_char.each_slice(1000).each_with_index do |s, i|
f2 = File.open("recibo#{i}", "w+")
f2.syswrite(s.join)
f2.close
@i = i
end
@text = ""
@i.times do |i|
@text << File.open("recibo#{i}").read
end
p @text.size
f2 = File.open("recibo2.jpg", "w+")
f2.syswrite(@text)
f2.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment