Last active
December 12, 2015 07:28
-
-
Save epitron/4736881 to your computer and use it in GitHub Desktop.
Compute a Base64 fixed-point.
This file contains hidden or 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
########################################################################### | |
# Base64 Fixed-point Calculator | |
########################################################################### | |
SEED = ":D" # The initial string to Base64 encode | |
AMOUNT = 1500 # How many bytes should the fixed point end up being? | |
########################################################################### | |
require 'base64' | |
########################################################################### | |
def clear | |
print "\e[H\e[J" | |
end | |
########################################################################### | |
result = SEED | |
loop do | |
result = Base64.encode64(result[0..AMOUNT]).gsub("\n","") | |
clear; puts result; sleep 0.15 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment