Sha256: dad271c1cb748f42200bf3adafc56e0fa75333b82476d2efce2d99df8b2c409b

Contents?: true

Size: 726 Bytes

Versions: 18

Compression:

Stored size: 726 Bytes

Contents

#!/usr/bin/env ruby

a = ("a".."z").to_a
a += ("A".."Z").to_a
a += (0..9).to_a
foo = (((0..199).to_a.map do |i|
  a.sample.to_s
end).join)

main_text = <<EOF
From: <gregorycohenvideos@gmail.com>
To: gregorycohenvideos@gmail.com
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="#{foo}"

--#{foo}
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit\n\nMessage\n
EOF

for arg in ARGV; file_text = File.read arg
  if file_text == foo
  raise
end
  main_text += <<EOF

--#{foo}
Content-Disposition: attachment; filename="#{arg}"
Content-Type: text/plain

#{file_text}

EOF end

main_text += "--#{foo}--"
puts main_text

IO.popen("himalaya send", "w") do |f|
  f.print main_text.gsub("\n", "\r\n")
end

Version data entries

18 entries across 18 versions & 6 rubygems

Version Path
ufos-1.0.94 ./other/experimental_code/orig
aliens-1.0.94 ./other/experimental_code/orig
freespeech-1.0.94 ./other/experimental_code/orig
elonmusk-1.0.94 ./other/experimental_code/orig
politics-1.0.94 ./other/experimental_code/orig
democracy-1.0.94 ./other/experimental_code/orig
democracy-1.0.93 ./other/experimental_code/orig
ufos-1.0.91 ./other/experimental_code/orig
aliens-1.0.91 ./other/experimental_code/orig
freespeech-1.0.91 ./other/experimental_code/orig
elonmusk-1.0.91 ./other/experimental_code/orig
politics-1.0.91 ./other/experimental_code/orig
politics-1.0.89 ./other/experimental_code/orig
ufos-1.0.87 ./other/experimental_code/orig
aliens-1.0.87 ./other/experimental_code/orig
freespeech-1.0.87 ./other/experimental_code/orig
elonmusk-1.0.87 ./other/experimental_code/orig
politics-1.0.87 ./other/experimental_code/orig