Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
When I have a lot of work (like lately), PerlMonks is a curse, because I find it so interesting to hang around here that I end up spending too little time working. So I wrote this little program to remind myself of what I should be doing :-)

A couple of points:

  • Sorry for the use of system to send email. But I spent a whole 5 minutes writing this script, and I really didn't feel like looking up Mail::Internet or whatever other module might have done the job.
  • I made it wait and loop itself instead of putting it in crontab to be able to have the $DISPLAY variable set.
Of course, writing this script and posting it here was just another excuse for not getting back to work. So here it is:
#!/usr/local/perl-5.6.0/bin/perl -w use strict; use PerlMonks; use PerlMonks::Users; my $n=PerlMonks::Users->new; while(1) { my %u=$n->users; if (exists($u{ZZamboni})) { system(q(echo Get to work | /usr/bin/mailx -s "Shouldn +'t you be working on your thesis?" zamboni)); if ($ENV{DISPLAY}) { system(q(wmessage -t "What are you doing?" --c +enter "Get back to work!")); } } sleep 300; }

--ZZamboni

Update: fixed typo: s/spend/spent/


In reply to Keep myself off PerlMonks by ZZamboni

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Corion]: Meh. My bank removed (part of) their CSV download facilities. Now I will either have to implement a full scraper or automate the download using the HBCI interface instead (or just get a new account elsewhere...)
    [Corion]: On the upside, I spend a lot of time thinking this weekend about how to actually implement rate limiting for futures, and if things work out, maybe even loading a configuration from an external file makes sense
    [Corion]: I've also found some interesting invariants that I have to think/write about more. A simple rate limiter will never change the order of the input, while a limiter that allows for parallel execution will change the order. But my API currently allows for bo
    [Corion]: ... for both, and I'm not sure if I want to add the cruft from the parallel API (a token that you need to hold on to while you hold the lock) to the rate limiting API too, to allow seamless up/downgrades, or not.
    [Corion]: Also, rate limiting will look great with await: my $token = await $limiter-> limit($hostname); instead of my $f = $limiter->limit( $hostname )->then(sub { my( $token)=@_; ... });

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (9)
    As of 2017-10-23 08:23 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My fridge is mostly full of:

















      Results (277 votes). Check out past polls.

      Notices?