Recent blog entries for shlomif

Tech Tip: Speed up building perl 5 by not installing the man pages

2015-12-03: Tech Tip: Speed up building perl 5 by not installing the man pages

When building perl 5 from source, one can speed up the "make" and "make install" stages significantly by not installing the man pages. To do so, pass the options “-Dman1dir=none -Dman3dir=none” to “sh Configure”.

Cheers, and happy upcoming Chanukkah, and happy Christmas and/or Yulth or whatever winter holiday you celebrate.

Call for action

Creative Commons has set up a campaign to stop TPP - the Trans-Pacific Partnership. Please consider signing it and spreading the word.

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions on how to comply with it.

Syndicated 2015-12-03 16:37:51 from shlomif

Tech Tip: Make Panes Equally Heighted in Tmux

When pressing «Ctrl+B;"» in tmux to split a pane vertically there, one will notice that tmux splits the existing pane into two which can result in smaller and smaller panes. In order to fix this, one can type «Ctrl+B;M-2» (where “M” is the Meta key and is normally “Alt” on most keyboards.) which will make all the panes equally heighted.

I found this feature after wondering whether it existed, and then searching for it in the tmux man page.

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions on how to comply with it.

Syndicated 2015-11-06 10:19:27 from shlomif

Freecell Solver 4.0.0 was Released

Freecell Solver version 4.0.0, has been released. It is available in the form of a source archive, from the download page. Freecell Solver is an open source library and some command line applications, for automatically solving several variants of card Solitaire / Patience games, including Freecell.

This release sports the integration of the scans of Tom Holryod’s patsolve for improved atomic moves-based solving, some other new flags with bug fixes, a transition of the Python code to Python 3, and some other changes that are mentioned in the NEWS file.

The most significant digit was increased due to the integration of patsolve. Enjoy!

Syndicated 2015-09-28 14:51:00 from shlomif

Tech Tip: Locally Host the Firefox’s Personas Favourites File

A constant annoyance when trying to use the Firefox extension “Personas Rotator” was that downloading the favourites file from the Firefox addons site failed, which made it stop rotating. I recently found a solution for that which I'd like to share.

First of all, login to the Mozilla addons site and access and bookmark the JSON data file’s URL. Save it to a file and host it using a local HTTP service (such as Apache, the one line Python HTTP service command line, or sthttpd’s “thttpd -p $PORT” invocation).

Then, go to Firefox’s “about:config”, access the “extensions.personas.favorites-feed.url” key and change it to the locally served one. It should work fine after restarting Firefox, and one upside to it would be that you no longer need to be logged in to addons.mozilla.org for it to work.

Remember to save the file again every once-in-a-while, after you have added new favourites. A final note is that a “file://” URL may work fine as well, but I have not tried it yet.

Happy rotating, and Shanah Tovah if appropriate!

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions on how to comply with it.

Syndicated 2015-09-15 12:18:06 from shlomif

“HTML 6” and a List of Graphics Applications

Here are the recent updates for Shlomi Fish’s Homepage.

  1. A new bit “Announcing ‘HTML 6’, the New Version of the Web” was published on 1 April 2015:

    1 April, 2015, Tel Aviv, Israel: Today, the World Wide Web Consortium (W3C) announced the immediate availability of the new version of the web — HTML 6 — pronounced “HTML Sicks [sic]” with the motto “HTML 6 is sick!”. “We concluded that the previous version of the World Wide Web’s standards suite, HTML5, has exceeded its flexibility and usability, and we need to start over”, said Tim Berners Lee, the director of the W3C.

  2. There’s a new list of “Alternative” commercial models for Web-based commerce that do not involve intrusive advertising.

  3. There’s a new list of graphics software applications.

  4. We now mirror funroll-loops.info (“Gentoo is Rice”), and the old feature “How to Make Square Corners with CSS”, which disappeared from the Web.

  5. There are new factoids in the collections of factoids about people and thing:

    A rose by a name picked by Chuck Norris, will smell sweeter.

    The reason the Messiah has not come yet, is because Chuck Norris keeps finding faults in God’s plan for his coming.

  6. There are new quotes in the collection of Aphorisms:

    Some people grow older and wiser. Not I. I grow older and more foolish.

Hope you enjoy all that, and if you’re Jewish, I hope you enjoy the upcoming Rosh Hashanah and the rest of the Jewish Autumn holidays.

Syndicated 2015-09-03 18:49:52 from shlomif

Tech Tip: Don’t pass the -j$N flag to make when building GNU guile2

In order to build GNU Guile (or at least its version 2.x), it is important not to pass the “-j$N” flag to “make”. Without the flag, the compilation will be faster (counterintuitively I admit), because some of the build tasks spawn as many processes or threads as the CPU cores on the machine, and with the flag, they get congested and the build is slower. Cheers!

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-09-01 15:22:55 from shlomif

Tech Tip: Trimming Old Releases from minicpan Directories

minicpan is a tool to create or update a minimal local mirror of CPAN (= the “Comprehensive Perl Archive Network”), that contains only the latest releases of CPAN distributions. Now, one problem I ran into when using it is that “minicpan” did not seem to delete the older downloaded releases after they were superseded by newer ones. A few days ago I found a solution to this problem.

What you can do is:

  1. Move away the minicpan’s mirror’s top directory (do not delete it!)

  2. Set up a localhost HTTP service on a high TCP port which will serve the moved minicpan directory. For that you can use the one line Python HTTP service command line or shttpd’s “thttpd -p $PORT” invocation or whatever.

  3. Run the “minicpan” command while pointing the remote to the localhost mirror of the old minicpan mirror, using the “-r” flag or by temporarily editing the “~/.minicpanrc” file.

Voila! Now the mirror will only contain the latest releases, and you can remove the old, moved-away, minicpan directory, and cancel the HTTP service.

Licence

Copyright by Shlomi Fish, 2015.

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-07-20 10:54:09 from shlomif

Tech Tip: Skip Tests in RPM .spec Files conditionally-to-version

Let’s suppose you are packaging a software application using RPM or a similar packaging system, and this application contains some automated tests that can be run using “make test”, “make check” or similar. You may opt to put them inside a “%check” section, but the problem now is that they may fail.

The solution I used in this case (assuming fixing the tests was out of scope of my work as a packager) was to comment out the command that ran the tests, but this is not ideal because that way the tests will also be disabled in subsequent versions of the application, unless the packager remembers to reenable them.

Recently, I discovered a better way to do that, after inspecting the source of a Mageia Linux package. One needs do something like that:

%define known_to_fail_version 1.82

%check

if test "%{version}" = "%{known_to_fail_version}" ; then
    true
else
    # Run the tests.
    make check
fi

This way, the tests will get run again for subsequent versions of the packaged application, and if they fail again one can set “known_to_fail_version” to a new value.

I hope you also find it a cool trick. Cheers!

Licence

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-07-14 08:53:24 from shlomif

Tech Tip: How to Debug Firefox’s UI Code Using the Debugging Tools

In order to debug Mozilla Firefox’s User Interface code (so-called “chrome” code), you should toggle the “Enable chrome and add-on debugging” checkbox in the Developer Toolbar’s setting and then go to “Tools → Web Developer → Browser Toolbox”. Thanks to jdm on irc.mozilla.org for part of this tip. Cheers and happy United Stated Independence Day (4th of July) in case you are an American.

Licence

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-07-03 08:39:31 from shlomif

Tech Tip: Fix Poor Internet Connectivity by Restarting the Router

I noticed that one can often fix poor home Internet connectivity (I have an ADSL connection but it may apply to other types of Internet connection), by powering off the router and starting it again (“restart/reboot”). So I’ve made a mental note to keep it in mind and now it’s in this blog as a tip. Cheers!

Licence

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version of it. See the instructions of how to comply with it.

Syndicated 2015-06-25 09:48:32 from shlomif

733 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!