Tail or cat a file: make it look like someone is typing them.
For some processes I was monitoring, this was far more entertaining than just watching a tail -f
.
user@host ~$ tail -f /var/log/messages | typrtail
user@host ~$ wget -q -O - http://www.gutenberg.org/files/730/730.txt | head -n 20 | typrtail
user@host ~$ gem install typrtail
typrtail
looks for $HOME/.typrtailrc
and if it exists, loads it. This file
is plain ruby, you can override any of the parameters any way you like…have
it your way.
# override some defaults, be faster with more errors! $speed_adjust = 0.35 # was 1.0 $typo_prob = 35 $min_typo_prob = 15 # stop more abruptly when we hit a typo $time_to_recognize_typo = 0.4 # was 0.3
Come on, it’s just for fun.
I was overworked and needed an escape.
Yeah, I’m sure it does, they’re probably better too, I needed a break.
Yes, you can. It’s a plain Ruby program, open it up and take a look at the top, there are a lot of constants (yes, globals – gasp globals! I know, how awful!) that control things like the typing speed. Have at ’em!