Category: Code

  • Properly run FastAPI uvicorn+gunicorn with HTTPS

    Properly run FastAPI uvicorn+gunicorn with HTTPS

    by

    in

    To run the FastAPI on HTTPS: edit systemctl service file of your app service. On Ubuntu, those files located at (/etc/systemd/system/) If you don’t remember where you put the service file of your app – just run the systemctl status command: systemctl status appname systemctl status appname Add two arguments related to the SSL certificate…

  • Properly Run Python Django under a local network

    Properly Run Python Django under a local network

    by

    in

    First, you need to find your local IP address with this command in cmd: ipconfig/all Open settings.py and add your IP address to the ALLOWED_HOSTS list: ALLOWED_HOSTS = [‘192.168.xxx.xxx’] Finally run command in the terminal: python manage.py runserver 192.168.xxx.xxx:8000 Voila, now you can visit your Django app by accessing this address(192.168.xxx.xxx:8000) from any device in…

  • The Ultimate WordPress website optimization techniques

    The Ultimate WordPress website optimization techniques

    by

    in

    The website optimization process is time-consuming, assembled from many parts, painstaking. It can’t be done all at once, it took more than a day of work, if you don’t have previous experience. To make this complete process look easier – I will divide it into smaller, more understandable parts. Where to start The page should…

  • I would automate everything with Python from now on.

    I would automate everything with Python from now on.

    by

    in

    Automating the boring stuff is part of my manifesto. I’ve decided to automate my daily work as much as possible with Python. Have you ever tracked how many times you lost by checking the same item at online shops over and over in the hope to spot a good deal? For me, it is 10…

  • Properly  schedule a crontab command for a Python script  on any Linux system

    Properly schedule a crontab command for a Python script on any Linux system

    by

    in

    There are a lot of articles over the internet that exist about the Python Cron schedule. Most of them are the working solutions and I’ve been setting up cron jobs for decades now, but unsuspectedly I’ve got a bug with my beloved sudo chrontab -e command and this is the reason I’ve written this article.…