Skip to content

Instantly share code, notes, and snippets.

@epitron
Last active December 12, 2015 07:28
Show Gist options
  • Save epitron/4736881 to your computer and use it in GitHub Desktop.
Save epitron/4736881 to your computer and use it in GitHub Desktop.
Compute a Base64 fixed-point.
###########################################################################
# 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