<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Karl,<br>
    <br>
    As a public service, why don't you annotate, comment, explain what
    each little bit of this thing is doing, for those of us to whom the
    syntax is not particularly perspicuous.<br>
    <br>
    Stan<br>
    <br>
    On 10/13/2011 4:36 PM, Karl Schuttler wrote:
    <blockquote
cite="mid:CALUi6oXiOBDqR-ET+Fm=NDNmW37wtZQAFCqZtctFxqq8u_3sVw@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi all,

Some of you may remember my world famous beep scripts from back in the
day, including great beep hits like Smoke on the Water (attached), and
Iron Man. I felt inspired yesterday and wrote up this quick ruby
script which makes random beeping sounds reminiscent of old sci-fi
computers when your linux computer is doing anything that requires a
bit of processor. Required is the linux beep utility (apt-get install
beep), ruby (probably already installed), and your pc speaker turned
on (modprobe pcspkr and use alsamixer to pump up the volume).

wopr.rb
=========
while true
  if `vmstat|tail -1|cut -d\" \" -f2`.to_i > 2
    system("beep -f " + (200+rand(400)).to_s + " -l 150")
  end
end


Leave it running in the background and have a little fun. To test it,
you can always do a dd if=/dev/urandom of=/dev/null to generate some
processor cycles.

Enjoy,
Karl
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
linux-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:linux-user@egr.msu.edu">linux-user@egr.msu.edu</a>
<a class="moz-txt-link-freetext" href="http://mailman.egr.msu.edu/mailman/listinfo/linux-user">http://mailman.egr.msu.edu/mailman/listinfo/linux-user</a>
</pre>
    </blockquote>
  </body>
</html>