Other articles

  1. Heroku tips

    Use an editor

    By default there is no editor on Heroku. To get one, you can use the heroku-nano plugin like this (or by installing as a plugin):

    mkdir bin
    cd bin
    curl https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz --location --silent > nano.tar …
    read more
  2. Use dnsmasq with NetworkManager

    Sat 08 September 2018 | tags: linux

    This will, for instance, allow you to redirect all matching domains to a certain server: dnsmasq will intercept the DNS query and return the ip you specified.

    To do this, edit NetworkManager configuration in /etc/NetworkManager/NetworkManager.conf and add in the main section dns=dnsmasq:

    [main]
    dns=dnsmasq
    

    You …

    read more
  3. VSCode tips

    Sun 02 September 2018 | tags: VSCode

    Contents

    Python

    venv

    To use a venv with VSCode, add in the folder settings:

    {
        "python.pythonPath": "~/.virtualenvs/bureauxlocaux--Uxk5jFn/bin/python",
        "python.unitTest.pyTestEnabled": true
    }
    
    read more
  4. Timeout a function in python

    Sat 02 June 2018 | tags: Python

    You can use signals and a context manager to acheive this. The idea is to register a function that will raise an exeption when the alarm signal is received and schedule the alarm signal for the timeout.

    import signal
    from contextlib import contextmanager
    
    
    @contextmanager
    def timeout(time):
        # Register a function …
    read more

Page 1 / 5 »

Pages

blogroll

social