tasksel: aptitude failed (100)

So today I tried to swap some desktop packages and got not very helpful:

tasksel: aptitude failed (100)

Common solution if you google it is to run:

apt-get update

and fix whatever errors, if you get one. I guess most common would be missing GPG keys for some of repositories used. Another one would be to run:

apt-get -f install

to fix whatever broken packages are.

But in my case none of these helped. I found real reason why tasksel was failing by running it in test mode:

Why it is not necessary for a job candidate to disclose their current salary

This is actually a comment to the blog post at https://www.linkedin.com/today/post/article/20140603205337-223492-the-lo... , but I hope it will clarify my thoughts on interviewing for a new job.

Docker containers and dnsmasq on the host

I am using dnsmasq to orchestrate libvirt virtual machines and provide custom hostname resolve rules. To use dnsmasq you normally put "nameserver" into your /etc/resolv.conf .

Scalling app deployed to Dokku

I am trying various open source PaaS based on Docker and so far the easiest one is Dokku.

The problem with Dokku is that it does not manage scaling of your app by launching more containers with yours application. You can install third-party plugins, which will start multiple processes inside single docker container, but this doesn't work well for web apps listening on one port. And I could not find how to leverage SO_REUSEPORT in Express.js app.

How to reboot Motorola SURFboard modem from command line

I got this annoying problem - my cable modem start acting weird after a while. So I wanted to setup cron job to restart it sometimes around 3am each day, but the problem is - there is no SSH or any kind of API access. But there is admin panel where you can click "Reboot" button. To solve this problem I used Zombie.js module:

sudo npm install zombie -g

and wrote small script to login into admin interface and click Reboot button:

Libvirt, UFW and port forwarding via DNAT

I am running several virtual machines on my server for different applications. And I am using port forwarding to route connections to appropriate virtual server. For example, I have separate mail server and I map host's port 25 to this virtual server port 25.

MySQL not use indexes for subqueries used in IN clause

One of clients mentioned awful slow query from Drupal's Boost module:

DELETE FROM boost_crawler WHERE hash IN (
  SELECT ca.hash_url FROM boost_cache ca
  WHERE ca.expire BETWEEN 1 AND 434966399 OR ca.expire > 434966400

Running EXPLAIN query turns out MySQL ignores indexes for boost_crawler.hash column completely. And I am not alone:

Installing Net::Amazon::MechanicalTurk on recent version of Perl

If you tried to install Net::Amazon::MechanicalTurk via cpan/cpanm command you likely get something like this:

Patching mod_fastcgi to support chroot setting under Ubuntu 12.04

When running PHP through PHP-FPM you have option to chroot FastCGI PHP server. Unfortunately, Apache is not aware of chrooting and therefore pass wrong script path to the server.

This patch supposed to help with it - http://orfika.net/src/mod_fastcgi-chroot-patch/

Below are steps I've run in order to apply this patch to my server. First, you want to remove installed mod_fastcgi package:

[SOLVED] GIMP 2.8 Freezes on select tool

Have no clue what happened to my GIMP installation. Every time I am using select tool (any - square, round, magic wand, etc) - it just freezes whole Gnome Shell. But I still able to get into VT with Ctrl+Alt+1 and kill process from there.

After googling everything - nothing came out and I tried simply delete ~/.gimp-2.8 folder. This did it! Probably some settings somewhere made GIMP get into forever loop or something..