Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
The simplest asciicast player
# This plays asciicast (v1 format - in your terminal:
# ruby play.rb asciicast.json
require 'json'
JSON.parse([0]))['stdout'].each do |frame|
sleep frame[0]
STDOUT.write frame[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment