Tworzenie Gier w Kivy i Kivent

Posted on pon 20 sierpień 2018 in python • Tagged with kivy, kivent

Skąd toto?

To jest artykuł napisany na potrzeby konferencji PyconPL 2018 i jest też do ściągnięcia z PyconPLowego githuba

Wstęp

Zarówno Kivy jak i Kivent mogą służyć do pisania prostych gier w Pythonie. W tym artykule, na przykładzie bardzo prostej aplikacji gropodobnej, porównam podstawowe aspekty tworzenia gier w jednym i …


Continue reading

Effective hg blame in VIM

Posted on nie 15 lipiec 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

(Non) humming servo

Posted on pon 28 maj 2018 in micropython

While I'm IoT, my servo is humming in almost every position. I hear annoying noise every time it's not moving.

After asking Dr. Google, I know that: servo is bad and I need to use another one, or is set to position which it unable to achieve and need to …


Continue reading

pmount hangs on autocompletion

Posted on śro 09 maj 2018 in misc • Tagged with tips&tricks

Problem

Bash autocompletion is very good thing if works. If doesn't, becames pain in the ass. Like in Debian's pmount - when you type '/dev/sdc' hit tab and wait forever.

Problem is described in many places (eg here and here), so why shouldn't I describe it once more?

Reason

Script …


Continue reading

PG dump with update

Posted on pią 09 marzec 2018 in postgres • Tagged with tips&tricks

Many times, I need to edit some value in particular row in table. The easiest way is to use pgAdminIII - however I don't use it, I'm addicted to psql.

Consider such table:

maho=# CREATE TABLE example(id SERIAL, vals VARCHAR);
CREATE TABLE
maho=# INSERT INTO example(vals) VALUES('some string …

Continue reading

Vuejs, Node i różne takie JSy

Posted on pią 23 luty 2018 in misc • Tagged with maruda

Fajne są te frameworki, React, Vuejs, Angular itd... Ale momentami mam wrażenie że ogon macha psem :).

Będąc zmęczony Angularem, postanowiłem następny prosty interfejsik wykonać w czymś innym. Padło na Vuejs, ponoć najprostsze.

Coś tam zrobiłem działającego, postanowiłem ubrać to w jakieś ikonki. W poprzednim bootstrapie były glyphicons - w najnowszym to …


Continue reading

Queryset repr trick

Posted on czw 15 luty 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

blog is live again

Posted on nie 04 luty 2018 in misc

And my blog is live again, this time using Pelican - static blog content generator.

UPDATE: I thougt about using Disqus for comments, but looks that they started adding ads. So, maybe static generated blog is NOT good idea?


Continue reading