Tag Archives: FOSS

Navigating through the git history like a boss

[ If you're not into reading why I find git history useful, you may jump right into the command-line coolness! ]

I love reading git logs! First, because it reveals the people and processes behind software. Software is not just a bunch of code that works (or more commonly, doesn't work...) - it's also a bunch of people crafting something together for a long time. Not only adding features and fixing bugs, but they also refactor, do dirty tasks and ugly workarounds, explaining their motives in the commit messages.

A second, more concrete reason - quick access to git history helps me make better software. It helps me find out when and how exactly a bug was introduced, learn whom to talk to about a certain change or code, or simply find a desired code snippet in a huge repository - even if it was already deleted. Am I stating the obvious here? I guess so! but I do believe that sometimes this tool is underestimated and underused.
Continue reading

Restarting the Linux sound subsystem

Sometimes my laptop gets to a state in which sound works through the built-in speakers, but not through the headphone jack. Possibly my solution is too brutal, but it works -  restarting the whole sound subsystem. I guess that it may come handy in other situation: the ability to restart a subsystem instead of rebooting the machine, is always an advantage.

The rationale is simply reloading the kernel module that acts as a driver to our sound hardware. Reloading isn't easy, as:

  1. Kernel modules use this module.
  2. User processes use this module.

Continue reading

Improve your shell experience with tmux & ConqueTerm

As a power text-mode user, I was both surprised and glad to hear (10x @erikzaadi!) about two interesting tools: tmux & ConqueTerm, which significantly changed the way I use the shell/terminal. I'll try to keep it short and to the point, and briefly explain the most notable behavior-changing features the way I see them. Or in other words: why should you give them a try.


tmux is screen-like. I didn't get to learn much of screen (absolutely my bad), so it's really not a "why tmux is better than screen" post, but simply what goodies does tmux provide.

tmux goodies: Continue reading

Introducing myip (no more ifconfig eye-grep!)

Complex tools for a simple task

It's common for us, users and admins, to check what is the ip of the host we are logged in to. Currently on Linux, this task is commonly done by the ip and ifconfig tools. However, I find them way too complex for the simple task of checking what's the IP. their output is full of confusing, irrelevant details, and they have tons of command-line arguments.

But you can pipe it all through grep, sed and awk!

Well... I'm not even going to explain why it isn't friendly.

myip for the rescue

So after I failed to find a simple tool for displaying IPs, I started writing it myself. Some command line samples: Continue reading

How I converted a VMware VM to KVM

There's lots of info on the net on achieving that, but I found it a bit too scattered, and had to combine instructions from multiple sources.

I'm not certain it's the right way, but it worked™. So I'll share, and get your feedback in case I've done anything stupid:

  1. Convert VMDKs (VM's disk), even when having multiple files,  to qcow2 format (note: QVM/QEMU should be able to deal with vmdk files (multiple as well?), so possibly this step is redundant):
  2. Convert the vmx (VM's settings) to xml (requires vmware2libvirt tool found in virt-goodies package)
  3. Continue reading

Raise or Return? (using exceptions, part 1)

Ever since I've been using exceptions, uncertainty has always been there: when are we better off with return codes? when is it smart to catch the exceptions? when should they better be left untouched and propagate higher? Create a separate exception class, or just pass an argument to the constructor?

cc-by-sa Jason McHuff

During the recent few years, I've been gathering some best practices I learned from my peers and by experience, which I'll dump here to a short series of posts. I hope it'll help to provoke some discussion on this rather important design matter. As it's a highly debatable matter, discussions are more effective than trying to declare the ultimate truth of proper usage of exceptions.

Most of my experience in this area is related to Python, but I believe the same discussion usually applies to all dynamic languages, and possibly to languages that use throw rather than raise.

Enough disclaimers, let's get started. An easy one for starters:
Continue reading

Network-Manager 0.9.2 WiFi password issues

I've noticed a few significant issues with Network Manager on GNOME 3.2, when connecting to WiFi networks that require password (e.g. WPA, EAP). Trying to find existing bug reports, I've found quite a mess: multiple bug reports, both downstream (Debian, Ubuntu, Fedora) and upstream (GNOME bugzilla).

I suspect many of these bugs are related to the same root cause (or max. 2-3 root causes). In order to try and make sense of this, I tried to categorize the bugs I've found. I hope it'll help to gather more info to resolve the bugs, and reject dups.

  1. NM (gnome applet?) forgets passwords:
    1. GNOME Bugzilla: [666465], [665431], [665503]
    2. Debian BTS: [651445], [646018]
    3. Ubuntu BTS: [904666]
    4. Mint forum post with a workaround
  2. NM takes too long to re-connect after resume (possibly problem in popping up the enter-password dialog box):
    1. GNOME: [664289],
    2. Debian: [651358], [653076]
  3. NM-gnome double password dialog box case:
    1. GNOME: [661208], [665503] - mentioned in 1st comment,
    2. Debian: [651097]

I'll try to update this post when new info arrives, please add your comments.

Generally speaking, I think that FOSS community lacks some "dirty-work" QA workforce for bug scrubbing, such as what I'm trying to do here. I don't even know how to name this non-coding activity. Thoughts? 🙂

Update1: This Linux Mint forum post suggests that only the applet "forgets" passwords.

Reviving the hibernate feature on Debuntu

My laptop's battery had just died. It made me realize how much I depend on it, for changing my working location, either when computer is awake or asleep for many hours. Without a battery, the sleep (aka suspend-to-ram) feature is less useful, for the tiniest power interruption would kill it. Continue reading

pylint Vim plugin update (0.24.0 support)

[Executives' summary (in case any executive uses Vim) - get this updated pylint.vim for compatibility with pylint 0.24.0 changes] 

Integrating Python code checker into Vim is really cool. It lets Vim provide (relatively) quick feedback on your code, be it a conventions warning or syntax error. That, in my opinion, increases coding productivity slightly.

The problem is, that configuring the vim-pylint integration is hell. for two reasons mainly:

  1. Doing it manually requires understanding of the unpleasant errorformat syntax and some other vim tricks.
  2. No good zero-setup plugin is available: official pylint.vim is unmaintained. I used to use this fork, but its not really active anymore.

Specifically, since I upgraded to latest pylint (0.24.0),  Vim stopped showing pylint's hints. That's because pylint's output was modified to contain the column number as well.

I've re-forked it, and updated it to support pylint 0.24.0. Note that it will probably fail with older versions. Please try it and send feedback (you can comment this post if easier).

The mysterious case of broken SSH client (“connection reset by peer”)

Update: from the info I've gathered, this is most probably a problem with some Cisco IDS/DPI is running on the ethernet equipment. Workaround is available in the content below, I still don't know what's the real solution here (Cisco equipment config? update Cisco firmware?)


Starting with 5.7p1, ssh client on specific environments fails connecting to specific (usually old versioned) servers. I reproduced it on a particular network, while trying to connect using new ssh client (5.8p1, Ubuntu 11.04) to an old server (default SSH server on RedHat 5.4).


This issue is around for quite a while, but is very tricky to reproduce or understand. What bothered me most is that many people reported it to different forums, each posting only a few (different) pieces of the puzzle. So my motivation here is to try and summarize the relevant info from multiple places. I'll do my best to update this post when I hear something new.

Complete Fact list Continue reading