Ideally we should have Free Software that serves our needs, but sometimes we must settle for a temporary solution. Google Nik Collection is now free as in free beer, some of its filters are just amazing and it is pretty straightforward to use. It is not difficult to make it work as a GIMP plugin on Linux, even if it is for Windows, thanks to WINE.
In a previous article we saw how it’s possible to do per process routing using namespaces. In this one we will achieve the same by using cgroups, iptables and policy routing. Perhaps the user case is a bit marginal (see the introduction in the mentioned article) but this article is a tribute to the extreme flexibility of cgroups.
The use case for this article may seem a bit strange in year 2013 but I swear it’s real. I have a (relatively) fast connection but I have a traffic cap on it and a (really) slow one which is flat. I would like to run not interactive task like “aptitude safe-upgrade” on the slow one but the bulk of my connections should go through the fast one. The work is done on a Debian Wheezy system, check that the “ip” command is not too old and lacks network namespace support.
Recently a customer asked me to debug some problems on their Joomla!/PHP site that had interoperability issues after some long time for unknown reasons. The site was using some commercial plugins which producer was long time gone and unreachable and worst of all they were all obfuscated. So even searching for some basic string that was displayed on the screen on error to understand what’s going on was not a straight forward exercise and going through the code was a mess.
Apart from changing the code in a logical way, for example by adding intermediate variables or splitting variable assignations into more operations and so on, the first most annoying part of PHP obfuscators is that they modify most of the characters in the strings values with their respective hexadecimal (format \xXX) or octal (\XXX) values and eliminate any line feeds or code structure. Once you get rid of this the code stays quite very messy but is, at least in the cases I analyzed, quite readable and just needs a little more bookkeeping with automatically named vars to go through.
Getting rid at least of this confusing representation is quite straightforward on the command line with a few tricks.
pyargocat is a small simple Python script that can be used to program the catalogs of the Argo Navis Digital Telescope Computer from a machine with a recent Python interpreter installed using the RS232 cable that you can either buy or easily construct yourself. pyargocat can manage, that is insert to the device, all three types of catalogs in the device (asteroids, comets and user defined objects), report the number of objects present, report available space and delete previously flashed catalogs. It can be used on any machine with a Python >= 2.7 installed and it has been tested on Linux and Windows machines.
The imported catalogs have to be in the standard format Argo Navis uses (please refeer to the Argo Navis manual for the details and for links to useful resources). As an example and as a possible useful addition for your advanced observing sessions you can download this sample file I created that I often use as a basis: fede-general.txt. (the file contains all the Abell planetaries, the complete ARP catalog of Peculiar galaxies, the Hickinson galaxy groups catalog, most of the PK Planetary Nebula catalog and a selection of particullar globular clusters such as the Palomars and Terzans). Also a comet database file is given as an example with the most interesting comet objects data at the time of writing: Comets.txt