My new ESP32 is bricked?

Posted on śro 17 kwietnia 2019 in micropython • Tagged with IoT, micropython, python, tipsNtricks

TL;DR: press 'boot' button when flashing ESP32. At least some of them.

I have connected newly bought ESP32 to usb cable and try to flash it with micropython image.

(micro) maho@dlaptop:~$ esptool.py --port=/dev/ttyUSB0 erase_flash
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_____....._____ …

Continue reading

Effective hg blame in VIM

Posted on ndz 15 lipca 2018 in misc • Tagged with tipsNtricks, hg, vim

If you want to open tab in vim, which shows you file history, file blame (who changed what) and patch history, here is easy command:

    :let fname=expand("%") | tabnew | execute 'read!hg blame '.fname | vnew | execute 'read!hg glog '.fname | new | execute 'read!hg glog -p '.fname

Continue reading

Queryset repr trick

Posted on czw 15 lutego 2018 in misc • Tagged with tipsNtricks, python

Sometimes, when I'm debugging something using pudb (probably it affects any interactive debugger), pudb is reflecting value of variables of QuerySet type, which makes unneccesary query to database. It makes debugging slow, and sometimes it breaks debugging context because of making changes in db.

To avoid that, add following code …


Continue reading