A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Perl subroutine parameters

Call subs like this:
sub_name(
      param1 => 'value1',
      param2 => 'value2',
);

Define subs like this:
sub sub_name {
    my $p1      = {@_}->{param1};
    my $p2      = {@_}->{param2};
    # etc
}

Media players for Linux

  • Rhythmbox. Great for internet radio and mp3s
  • VLC
  • Movie Player (Ubuntu). Sucks for audio.

Text-based web browsers

  • http://w3m.sourceforge.net/
  • http://lynx.browser.org/
  • http://www.jikos.cz/~mikulas/links/

How to search PDFs on ubuntu

  1. sudo aptitude install poppler-utils
  2. pdftotext file.pdf
  3. grep [search text] file.txt

Run an SQL script

  • (a) pipe it into the program:  mysql < script.sql
  • (b) source it from within mysql:  source script.sql

See also batch commands

Ways to access Google Reader on Blackberry

  • Blackberry browser - Google Reader site doesn't work, site says it's loading too slowly and fails.
  • Blackberry browser - add all RSS feeds manually as bookmarks - too tedious.
  • Opera Mini - Google Reader works. Opera settings:
    • Mobile view: off
    • Full screen: on
    • View Google Reader in: Mobile view (link at bottom of web page)
  • Apps on Blackberry Curve 8900, Platform 5.2.0.67, App Version 5.0.0.681
    • BeReader 1.1.49 (BerryReader, free trial) - I logged in and selected 'choose feed', it crashed with "Uncaught exception: Application berryreader(421) is not responding; process terminated".
    • Viigo 3.1.507 - Works great for its built-in feeds, but adding my Google Reader results in "no feeds" warning and "authentication error". Also can't change font size or wrap titles, so you only see the first 4-6 words of the title. Loading the article is fast though.

Things wrong with FosWiki WYSIWYG editor

http://foswiki.org/ (Not FossWiki)
  • Sometimes this invisible string appears at the bottom of the document, and you can't add anything more in WYSIWYG mode, until you go into Wiki Text mode and delete it: \x{feff}\x{feff}\x{feff}
  • When an empty bullet point is at the end of a list, it often gets stuck there and cannot be removed in WYSIWYG mode.
  • Often, pressing enter in part of the document in WYSIWYG mode causes the focus to jump up to the start of the document, and the enter is put in there, instead of where the cursor was.