Other articles


  1. Starting with affinity

    Relearning my way around Windows, here is a useful trick (and it's easer than doing it on Linux):

    To start a program pinned to one core, invoke it from cmd.exe with a parameter /affinity <core bitmap>. For instance, for Parity, replace the target with

    cmd.exe /c start "Parity …
    read more

    Comments

  2. How to generate 32 random bytes

    In Linux, using Python 3:

    bytes = 32; 
    raw_random =  os.getrandom(bytes)
    hex_random = hex(
        int.from_bytes(
            raw_random, sys.byteorder
        ))[2:].zfill(2*bytes)
    hex_random
    

    Example: 1ded878a7ef3c93389cb08b19a254c846dbd3e88d3b3363dd384977ef81bcc3f

    Key is that /dev/urandom is cryptographically secure except just after startup.
    The getrandom system call waits until there is enough entropy, compared to reading …

    read more

    Comments

  3. Ad Blocking

    Instead of using adblocking extensions for your browser, null-route advertising on the router level for all connected devices, by using an adblocking DNS server.

    Steps:

    • pick an adblocking DNS server you trust (free example: Adguard)
    • login to your router and locate the DNS settings
    • change the DNS server option from …
    read more

    Comments

  4. Python Packaging

    It's a mess. On Arch Linux, we even have Python 2 and 3 side by side. While virtualenv is probably a usable solution, friends don't let friends build numpy...

    I always advocate using the Anaconda Python distribution. So far, I had also advised using something like pip install --user <pkg …

    read more

    Comments

  5. New Adventures

    Well, that didn't last long!

    Alt Text

    Being a contractor, I was an easy victim of the layoffs at eBay, and am currently looking for new adventures.
    Here is my CV.

    UPDATE: Employed again since April 1, 2015.

    read more

    Comments

Blogroll

Social