Category: Uncategorized

  • NoScript, XSS risks, flattr, Firefox

    I really loved to use NoScript, the plugin for Firefox. But after I decorated my blogs with these flattr buttons, I started having to much hassle.
    Adding an exception rule didn’t lead to the expected result.
    I have got no further time to fix that, I switched of NoScript. R.I.P.

    I really felt a lot safer with NoScript running and surverying my surfing activities.

  • unit tests for my procmailrc

    I love adding procmail rules, as getting my incoming e-mail almost perfectly sorted eases my life in such a tremendous way – but sometimes that really frightens me.
    I just thought, if I ever get around “to it”, I will write unit tests for my procmailrc.

  • Polish court to decide on Brodsky

    Polish authorities may deport alleged Israeli spy Uri Brodsky to
    Germany this week. …
    The Brodsky affair has caused friction with two of Israel’s most
    important European partners. According to media reports in Germany,
    Israel has
    turned the diplomatic screws on Poland and Germany to prevent an
    extradition of
    Brodsky to Germany.
    A Polish diplomat told the Warsaw-based Rzeczpospolita daily in June: “If we extradite him, we will anger the Israelis. If we release him, we will anger the Germans.

    When we discovered this man… we should have pretended that we had not seen him. But now it is too late.”

    The federal prosecutor told The Jerusalem Post in June that the matter is based on the forgery of a German passport and illicit secret service activity in the Federal Republic. He insisted that the pursuit of the alleged secret service agent is purely a legal matter, and would not identify the agent as Israeli. …

  • App::perlbrew – Manage perl installations in your $HOME or wherever you want

    Prerequisites:
    • $ zypper install patch
    • $ zypper install gcc
    Caveat:
    • yes, “perlbrew install” occasionally and too often  needs “–force” and even “–notest“, don’t be too surprised! my “5.14.2” and also my “5.16.1” needed it
    Main links:

    $ export PERLBREW_ROOT=/opt/perlbrew
    $ curl -kL http://install.perlbrew.pl | bash
    # or maybe like this:
    $ perlbrew self-upgrade

    The developer/maintainer does not have in mind this use case as the main use case!! But it is my main use case.
    What to do after installing a new perl, that you consider your new stable perl?

    $ perlbrew alias create perl-RELEASE stable

    # resp.
    $ perlbrew alias -f create perl-RELEASE stable
    # use this shebang line with $PERLBREW_ROOT expanded [Link]:
    #! $PERLBREW_ROOT/perls/stable/bin/perl

    $ perlbrew switch stable # this will be our usual starting point!!!

    # but “perlbrew list-modules” does not work on such an alias, so “perlbrew use” to a non-alias before!

    • Have a serious look at “$ perlbrew help” once in a while!!!



    I decided to make use of $PERLBREW_ROOT, as I want to keep my home $HOME minimial, just data and scripts, no big files, they all go to other disks. And right, my home directory is on an encrypted partition, and this sort of stuff certainly does not get encrypted.

    $ export PERLBREW_ROOT=/usr/local/perlbrew

    Therefore my perlbrew is installed as:

    /usr/local/perlbrew/bin/perlbrew

    They suggest, that my $HOME/.bashrc should “source” their …/etc/bashrc, but for the time being I let my $HOME/.profile do this, as IMHO this is right place.
    So actually this is according to best practices for shell programming the right way (for me) to do it, and now this code is of course included in my $HOME/.profile:


    # for perl’s App::perlbrew :
    export          PERLBREW_ROOT=/usr/local/perlbrew # on my Linux boxes
    export          PERLBREW_ROOT=/sw/perlbrew # on my Mac box(es)
    source         $PERLBREW_ROOT/etc/bashrc
    ##export  PATH=$PERLBREW_ROOT/bin:$PERLBREW_ROOT/perls/current/bin:${PATH}
    path_prepend   $PERLBREW_ROOT
    path_prepend   $PERLBREW_ROOT/perls/current


    BTW: always “$ hash -r” after switching, so you avoid getting certain perl resp. perlbrew related error messages like this one and a few others (confusion of the right installation directory):

    bash: …: No such file or directory

    I successfully brewed 5.10.1 and 5.12.1 on openSUSE-11.2, but on OS X Snow Leopard I only brewed 5.12.1 successfully, brewing 5.10.1 failed.


    To be continued …


    Update 2011-10-16:
    On my Mac running Lion I was able to perlbrew these releases of perl

    • perl-5.15.3 and
    • perl-5.14.2
    • but not perl-5.12.4, 5.10.1, 5.8.9, 5.6.2
    but that seems more than sufficient to me.

    Looks like OS X got targeted as a serious platform for perl development only rather recently.



    Update 2012-10-07: A historic note: I first looked into perlbrew in the context of “biz-JG”.

  • ruby, gsub, and backslash characters within the replacement

    My ruby problem of the day: I have e-mail addresses, and I want to use them within procmail rules. Therefore certain characters like the dot character and also the “+”  need escaping.

    It took me an endless while, like certain things always take an endless while on unknown grounds.

    I started with single quotes just as in the gsub examples in the pickaxe3 book.

    I didn’t get the right number of backslashs in place within the replacement string, as long as the replacement string used single quotes.

    Finally a Google search for “ruby gsub replacement backslash” led me to a solution. Not to an overly serious one, to be honest.

    The example there used double quotes, so I replaced my single quotes with double quotes, and I started again increasing the number of accumulated backslash characters. That way I achieved within a pretty short time, what I needed to achieve. Not that I had learned too much.

  • working through elance.com

    what do you think about working through elance.com as a “provider?

  • Spidering Hacks – O’Reilly Media

    CHAPTER ONE


    Hack #2 – Best Practices for You and Your Spider    


    Be Liberal in What You Accept
    … This is an inexact science, to put it mildly. …

    Monitor your spider’s output on a regular basis to make sure it’s working as expected [Hack #31], make the appropriate adjustments as soon as possible to avoid losing ground with your data gathering, and design your spider to be as adaptive to site redesigns [Hack #32] as possible.

    Don’t Reinvent the Wheel

    • Best Practices for You

    If you must scrape HTML, do so sparingly. If the information you want is avail- able only embedded in an HTML page, try to find a “Text Only” or “Print this Page” variant; these usually have far less complicated HTML and a higher content-to-presentation markup quotient, and they don’t tend to change all that much (by comparison) during site redesigns.
    Hack #4 – Registering Your Spider
    By the way, you might think that your spider is minimal or low-key enough that nobody’s going to notice it. That’s probably not the case. In fact, sites like Webmaster World (http://www.webmasterworld.com) have entire forums devoted to identifying and discussing spiders. Don’t think that your spider is going to get ignored just because you’re not using a thousand online servers and spidering millions of pages a day.
    Naming Your Spider
    … There are web sites, like http://www.iplists.com, devoted to tracking IP addresses of legitimate spiders. …
    Hack #5 – Preempting Discovery
    No matter how gentle and polite your spider is, sooner or later you’re going to be noticed. Some webmaster’s going to see what your spider is up to, and they’re going to want some answers.

    Hack #6 – Keeping Your Spider Out of Sticky Situations Hack
    Bad Spider, No Biscuit!
    … There is nothing stopping a disgruntled site from revising its TOS to deny a spider’s access, and then sending you a “cease and desist” letter. … Spidering another site’s content and reappropriating it into your own framed pages is bad. Don’t do it. …
    Competitive IntelligenceSome sites complain because their competitors access and spider their data—data that’s publicly available to any browser—and use it in their com- petitive activities. You might agree with them and you might not, but the fact is that such scraping has been the object of legal action in the past. Bid- der’s Edge was sued by eBay (http://pub.bna.com/lw/21200.htm) for such a spider. …
    Possible Consequences of Misbehaving Spiders
    … But considering lawyer’s fees, the time it’ll take out of your life, and the monetary penalties that might be imposed on you, a lawsuit is bad enough, and it’s a good enough reason to make sure that your spiders are behaving and your intent is fair.
    CHAPTER TWO
    Assembling a Toolbox

    Hacks #8–32



    Chapter 4 Gleaning Data from Databases

    Hack #69 – Aggregating RSS and Posting Changes
    -> meta feeds, aggregating feeds, …

  • jobs.perl.org needs a couple of changes — let’s start brain storming!

    For me as a freelancer it’s very clear:

    • There must be separate feeds for freelance and salaried staff.
    • There should be an opportunity of commenting on the job postings, e.g. if the original poster doesn’t close the job, it makes sense to get that information from somebody else, maybe from somebody who was somehow involved. Yes, that cannot happen anonymously.

    What else?

    Yes, I tried to contact Ask
    Bjørn Hansen
    at ask(AT)perl.org before I started this here, but to no success.

  • “Tour de Babel” by Steve Yegge

    […]
    My whirlwind tour will cover C, C++, Lisp, Java, Perl, (all
    languages we use at Amazon), Ruby (which I just plain like), and Python,
    which is in there because — well, no sense getting ahead of ourselves,
    now.

    […]

  • iPhone apps, that I need sooner or later