• solo
    • post

    Firefox v57 (aka Quantum) damage control

    updated Sept 22, 2018: wow, talk about wreaking havoc… 10 month after v57 release the Firefox extension ecosystem is still in shambles. and the noose is getting tighter, because the last update of the last pre-Quantum ESR Firefox was in June 2018… ok, so i got very lucky to spot the heads up on TheReg in time to dodge the “Quantum” bullet (by locking in the v56 version in the package managers on my main rigs).
    • solo
    • post

    centering images in Hugo

    tl;dr summary: jump to the solution down below for a neat trick. the problem as i was porting one of my old pages to Hugo, i encountered and unexpected snag. the page contained an image which i wanted to appear on the page centered (< gasp > fancy that!). sounds like a 16-character problem solved straight out of muscle memory, right? not quite. the philosophical angle the thing is, that Hugo is mainly - but not only - geared towards writing content in extended Markdown.
    • solo
    • post

    python memory leak debugging

    ah, yes, the wonders of “automatic memory management”… got off the horn with a good mate and a former colleague who’s struggling with a ugly memory leak in a bit of python code he needs to hammer into shape. cobbled together the following pointers for him. and it’s quite a shame that there’s a bunch of them too, because none of them are really all that good… tracemalloc: also merged upstream into python std lib as of python v3.
    • solo
    • post

    SFTP implementation-level notes

    some of the server implementations appear to be buggy and/or not totally spec compliant. SFTP is a “subsystem” mechanism of SSH, slightly vaguely defined at the connection protocol RFC-4254 layer of the SSH arch. first you have to open a session, then you can start a shell, execution of some command, or a “predefined subsystem” on the server. SFTP is one of the latter. it turns out there are actually a whole bunch of different SFTP versions, not one of which appears to have made it to an official RFC number from IETF, all remain personal or official drafts.
    • solo
    • post

    virt-top for monitoring local VMs

    bumped into this one by accident while looking for something else, but it’s most handy to keep an eye on the local VMs from the console1, including network and disk I/O! it could have come in handy a year ago… virt-top obtains the data from libvirt, so you need to have that going first. on the positive side, perhaps the libvirt indirection will allow it to support stuff other than KVM (i may have seen Xen mentioned somewhere).
    • solo
    • post

    emitting uevents with extra env info

    the number of different uevent actions that can be emitted by the kernel these days is limited, and seems to be fixed. from include/linux/kobject.h: 40 /* 41 * The actions here must match the index to the string array 42 * in lib/kobject_uevent.c 43 * 44 * Do not add new actions here without checking with the driver-core 45 * maintainers. Action strings are not meant to express subsystem 46 * or device specific properties.
    • solo
    • post

    fixing links in google search results

    updated Sept 5, 2016: looks like Don’t track me Google is now also available as a firefox extension, though for the time being i’m sticking with Google search link fix on Firefox. updated Oct 19, 2014: rewritten to reflect existence of Google search link fix and Don't track me Google google has been annoying the crap out of me in the last year or so by rewriting all the links in my search results to total gobbledygook with infinitely long custom google URL prefixes that have an escaped actual target URL tucked at the end.
    • solo
    • post

    crosstool-NG HOWTO & gotchas

    cross-toolchains are typically used to build code that is supposed to run on a machine with a different architecture, e.g. when developing embedded code for an ARM-based box on a x86 dev machine. however, they’re also very useful when you want to make sure that all the devs in a group use exactly the same set of toolchain binaries and libraries regardless of which versions of gcc, headers and libraries those devs have installed locally on their dev machines.
    • solo
    • post

    assigning QEMU VMs static IPs with libvirt

    NOTE: the below assumes you’re running the VMs in NAT mode. nowadays most distros are very good at acquiring dynamic IP addys from DHCP servers during the install process, and libvirt comes with a lightweight DHCP server (as part of dnsmasq) which works just fine for the job at hand. however, sometimes it’s handy to ensure your VMs have static IPs while playing around, e.g. on a lappy.
    • solo
    • post

    X: don’t ask

    this was simply too hilarious to pass by… it’s the subtitle of Xmu library manual from x.org, but i think it sums up 25 years of “X Window System” as a whole better than any other attempt i’ve ever seen… “Don’t ask.”