?

Log in

Shlomif's Technical Posts Community [entries|archive|friends|userinfo]
Shlomif's Technical Posts Community

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| Shlomi Fish's Homepage Main Journal Homesite Blog Planet Linux-IL Amir Aharoni in Unicode open dot dot dot ]

Tech Tip: Checking the Latest Build in Travis CI [May. 27th, 2016|03:43 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , ]
[Current Location |Home]
[Current Mood |lazylazy]
[Current Music |Shania Twain - You win my love]

If you are using Travis CI, you can check the latest build after a failed build by going to the “Build History” tab in your project’s main page (= https://travis-ci.org/shlomif/fc-solve or equivalent), and selecting the new commit.

Licence

Copyright by Shlomi Fish, 2016.

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.

LinkLeave a comment

Tech Tip: Speed up building perl 5 by not installing the man pages [Dec. 3rd, 2015|06:37 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , ]
[Current Location |Home]
[Current Mood |accomplished]
[Current Music |David Amber ft. Devyn Rush - Gnarly (from jamendo.com)]

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.

Link1 comment|Leave a comment

Tech Tip: Make Panes Equally Heighted in Tmux [Nov. 6th, 2015|12:19 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , ]
[Current Location |Home]
[Current Mood |happyhappy]
[Current Music |Cascada - Summer of Love]

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.

LinkLeave a comment

Tech Tip: Locally Host the Firefox’s Personas Favourites File [Sep. 15th, 2015|03:18 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , , ]
[Current Location |Home]
[Current Mood |calmcalm]
[Current Music |Manowar - I believe]

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.

LinkLeave a comment

Tech Tip: Don’t pass the -j$N flag to make when building GNU guile2 [Sep. 1st, 2015|06:22 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , ]
[Current Location |Home]
[Current Mood |Happy]
[Current Music |Celine Dion - The Power of Love]

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.

LinkLeave a comment

Tech Tip: Trimming Old Releases from minicpan Directories [Jul. 20th, 2015|01:54 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , , ]
[Current Location |Home]
[Current Mood |Calm]
[Current Music |OMC - How Bizarre]

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.

LinkLeave a comment

Tech Tip: Skip Tests in RPM .spec Files conditionally-to-version [Jul. 14th, 2015|11:53 am]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , ]
[Current Location |Home]
[Current Mood |Contemplative]
[Current Music |Monkees - Daydream Believer]

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.

LinkLeave a comment

Tech Tip: How to Debug Firefox’s UI Code Using the Debugging Tools [Jul. 3rd, 2015|11:39 am]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , , , ]
[Current Location |Home]
[Current Mood |Happy]
[Current Music |Paul McCartney - C'Mon People]

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.

LinkLeave a comment

Tech Tip: Fix Poor Internet Connectivity by Restarting the Router [Jun. 25th, 2015|12:48 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , ]
[Current Location |Home]
[Current Mood |Happy]
[Current Music |Karmafish - Last Testament (ft. Vegas)]

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.

LinkLeave a comment

git Tip: How to Call “git bisect start” [Jun. 6th, 2015|08:10 pm]
Shlomif's Technical Posts Community

shlomif
[Tags|, , , , , ]
[Current Location |Home]
[Current Mood |Productive]
[Current Music |Sweet Pwa]

“git” is an open-source distributed version control system that has recently gained a lot of popularity. The “git bisect start” synopsis in “git help bisect” is somewhat misleading:

git bisect start [--no-checkout] [<bad> [<good>...]] [--] [<paths>...]

One has to specify both the “bad” and the “good” revisions explicitly or else “git bisect” will wait for the missing ones to be specified, which will be confusing. So specify them immediately at the “git bisect start” invocation.

Incidentally, perl-5.22.0 was released a few days ago. Grab it while it’s hot!

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.

LinkLeave a comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]