Skip to content

Instantly share code, notes, and snippets.

@vy-let
Created July 29, 2015 00:40
Show Gist options
  • Select an option

  • Save vy-let/65b1fd47c3950e2bea6a to your computer and use it in GitHub Desktop.

Select an option

Save vy-let/65b1fd47c3950e2bea6a to your computer and use it in GitHub Desktop.

Revisions

  1. Talus revised this gist Jul 29, 2015. No changes.
  2. Talus created this gist Jul 29, 2015.
    15 changes: 15 additions & 0 deletions terminal-pinwheel.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/usr/bin/env ruby

    begin

    loop do
    %w( ).each do |pchar|
    print "\x1b[1G\x1b[0K#{pchar} "
    sleep 0.1
    end
    end

    rescue Exception
    # goodbye
    print "\x1b[1G"
    end