Last active
December 26, 2016 08:34
-
-
Save ryuheechul/ae44a0c0a0774d5cae512093e4792ff8 to your computer and use it in GitHub Desktop.
base64 encode for env values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
filename = ARGV.first | |
file = File.new(filename, "r") | |
while (line = file.gets) | |
k, v = line.split('=', 2) | |
ev = `echo "#{v}" | base64`.gsub("\n",'') | |
puts " #{k}: #{ev}" | |
end | |
file.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment