Skip to content

Instantly share code, notes, and snippets.

@scalone
Created August 19, 2014 13:27
Embed
What would you like to do?
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