Other articles

  1. Tool spotlight: tig - The curses git repository browser

    tig (git spelled backwards) is a great interactive git repository browser and pager with vim-like controls. It uses curses so you can run it in terminal, unlike similar gitk. And of course, it uses colors.

    tig main view


    Run without parameters to get current branch history:


    You can also view specific revisions or use --all to view all branches:

    tig HEAD~
    tig foo-branch
    tig foo bar baz
    tig --all

    Display only commits changing specific file(s):

    tig -- file
    tig foo-branch -- file1 file2

    It also features a colored blame view (screenshot):

    tig blame file

    See man tig for more goodness.

    Interactive use

    Press h for shortucts list, here are few I use often:

    • enter open commit view (in main view); vim keys move within commit view while arrows move between commits - handy!
    • q close view or exit when in main view
    • t tree view, you can browse files at selected commit and
      • B blame view
    read more
  2. Developing/testing vagrant-libvirt

    This is a draft I update on the go.

    My goal is to make Vagrant work with QEMU/KVM using libvirt and this is a development quickstart for vagrant-libvirt plugin which does exactly that and which I plan to improve.


    Download and install vagrant package.


    Lives on github.

    Nice README


    git clone https://github.com/pradels/vagrant-libvirt.git
    cd vagrant-libvirt
    # dependencies on Fedora 18
    sudo yum install -y libvirt gcc rubygem-bundler
    sudo yum install -y libxml2-devel libxslt-devel libvirt-devel libffi-devel
    bundle install

    create box

    A box is a tarball containing:

    • qcow2 image file named box.img.
    • metadata.json file describing box image (provider, virtual_size, format).
    • Vagrantfile that does default settings for the provider-specific configuration for this provider.

    vagrant-libvirt git contains example_box:

    cp -r vagrant-libvirt/example_box my_box
    cd my_box
    # get qcow image
    wget -O box.img "https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
    # From example_box/README.md:
    edit metadata.json
    tar cvzf my_box.box ./metadata.json ./Vagrantfile ./box.img
    vagrant box add my_box my_box.box


    You can test the plugin without installing it into your Vagrant environment by creating a Vagrantfile in vagrant-libvirt directory and add as a first line

    Vagrant.require_plugin ...
    read more
  3. Tool spotlight: arbtt - The Automatic Rule-Based Time Tracker

    The name says it all. arbtt-record runs in background recording opened windows, their titles and active window.

    Later you can use arbtt-stats to categorize, tag and display recorded data based on defined rules. Example file shows the possibilities, but you can get interesting information with only a few rules.

    Examples with ~/.arbtt/categorize.cfg:

    What applications do I use?

    $ arbtt-stats -c app
    Statistics for category "app"
           app:terminal |  3h05m00s |      27.29
            app:firefox |  2h28m00s |      21.83
               app:mail |  1h38m00s |      14.45
             app:chrome |  1h14m00s |      10.91
                app:IRC |  1h09m00s |      10.18
                 app:IM |    52m00s |       7.67
               app:gvim |    51m00s |       7.52
    (1 entries omitted) |     1m00s |       0.15

    How do I waste my time?

    $ arbtt-stats -c evil
    Statistics for category "evil"
          evil:Gplus |    48m00s |       7.04
           evil:9GAG |    35m00s |       5.13
    (unmatched time) |  9h59m00s |      87.83

    What am I doing all the time?

    $ arbtt-stats
    Total time per tag
            work |  8h25m00s |      73.83
    app:terminal |  3h05m00s |      27.05
     app:firefox |  2h29m00s |      21.78
        app:mail |  1h38m00s |      14.33
      app:chrome |  1h14m00s |      10.82
         app:IRC |  1h09m00s |      10.09
        app:gvim |    56m00s |       8.19
          app:IM |    52m00s |       7.60
      evil:Gplus |    48m00s |       7.02 ...
    read more
  4. Query latest version of package from arbitrary RPM repository

    To query a rpm repository not configured in yum (usually /etc/yum.repos.d), use repoquery

    yum install repoquery

    with its --repofrompath argument:

    repoquery --repofrompath=foo,http://repo.url/path --repoid=foo -q package

    Caveat: If you use same repoid for multiple repos, you’re gonna have a bad time!

    For script usage, see repoquery fetcher in my beloved verwatch tool.

    read more
  5. Huh?

    I’ve created this site to accomodate my daily tech notes, recipes and tips that might be of use to someone else as well.

    Pelican seems like a wonderful tool for this purpose, I’m looking forward to testing it.

    read more

Page 1 / 1