Skip to content

Instantly share code, notes, and snippets.

Created December 13, 2014 11:01
Show Gist options
  • Select an option

  • Save anonymous/055a8fc90419b5beb9ba to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/055a8fc90419b5beb9ba to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Dec 13, 2014.
    9 changes: 9 additions & 0 deletions loghn.pl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    use HTML::FromANSI ();

    open (LOG, '>>hnchatlog.html');
    select((select(LOG), $|=1)[0]);
    print LOG "<body bgcolor=black>\n";
    while (<>) {
    my $h = HTML::FromANSI->new();
    print LOG $h->ansi_to_html($_), "\n";
    }
    1 change: 1 addition & 0 deletions run-watchdog
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ssh [email protected] | tee >(perl loghn.pl)