Fixing the brake position on xiaomi mijia m365 pro

Long story short: You want to hold both the handle bar and the brake lever, not only the brake lever.
Long story:

Please note that this modification may void your warranty!

Before starting, please review the whole process, you may need a friend holding some parts.

Remove the bolts from the bell and the brake lever

Remove the grip. You may inject water between the bar and the grip for easier removal. Don’t rotate the grip too much, there is a rubber preventing the rotation.
Continue reading
Posted in E-scooter, no category | Leave a comment

Samsung QLed tv review

My experience

I have Samsung QE55Q6FNATXXH TV. It is a 55 inch Qled tv.

Specifications can be found on

At the same time my parents get a new TV too, some cheap 4k 49″ JVC

We both have TVs for half a year.

First impression

There is no huge difference in the picture, but the Samsung tv has a better one. It is normal, it is more expensive.

Both TVs handle youtube videos perfectly. 4k demo files from youtube are awesome.

Samsung remote is much better and elegant, but the voice commands are totally unusable. The device can’t understand 80% of my voice. There is an easy workaround. I’m using the google assistant integration and voice commands thru the google app! I don’t have cable TV, so I don’t know if its functionality is usable over google assistant.

I haven’t tested the JVC with the google integration.

Samsung TV have much better cable management, the UI is much faster.

Looks like more money = better product.

Here comes the problems

Samsung is using their own TIZEN OS. Unfortunately apps for tizen are not a lot, compared to JVC android apps.

Samsung doesn’t have 3rd party player (like VLC for the android based TVs (the JVC is andoid based).

The main problems hare are

  • Lack of audio/video codecs support from Samsung
  • Lack of subtitles support and options

This problem can easy by fixed by using app like PLEX, see

The main problem here is that PLEX works over the network. You can’t plug external HDD and watch movie with plex ,you have to use the native player.

So, the solution is to use PLEX and have movies stored on your PC. Your PC should also have plex server installed and running.

Android based TVs have so many players, I won’t even list them, you can google it.

So far, so good.

More Problems

The problem with streams over the network is that the video is decompressed using the TV hardware.

Let’s watch high bitrate 4k videos or … not

I will use demo files from

Short story: everything higher than 45 Mbps is unwatchable.

Wait … what?

Yes, correct, you can’t watch high bitrate 4k videos.

According to samsung specifications – i should be able to watch 80 Mbps HEVC videos. Hmmmm … I can’t. I contacted the samsung support for my country (BG) and they told me that this is not their problem, they are only fixing the hardware stuff.

OK. Probably demo files (used by everyone) are broken. I tested with other videos and result is the same – my fucking expensive TV can’t play 45+ Mbps videos. What the fuck!?

So, I have to move my desktop PC near the TV and watch movies with the HDMI cable 🙁

Apps or the lack of apps

I mean …. I have ‘smart’ tv without any fancy apps. Why am I locked to this awful tizen….

Why samsung didn’t made a double boot – android or tizen.

Literally there are sites with all tizen tv apps listed in single page. Single page can have all tizen apps + descriptions!

The JVC have so many apps that I probably need 10 minutes of scrolling to get to the end of the list.

Ah, not, the twitch app is gone, see

Power consumption

Ehm…according to the specifications – my TV should use 0.5W on standby.

Standby Power Consumption 0.5

But actually it uses around 13. This is 25 times more! I contacted the support about this issue and they told me that there is nothing that can be done.

Fuck me. Stupid fucking TV. I plugged the tv in smart socket. When the tv is not used I’m turning of the socket. 3.6 not good, not bad. The downside here is that you have to turn on the socket and then turn on the tv.

The TV uses 13-18W when it is off. After a few minutes the power consumption drops to ~0.6

Lets get back to the 4k videos

There are 120, 140, 200, 400 Mbps demo videos.

Lets try ’em all.

You know, usually the wired connection is faster than wi-fi. The problem is that the TV have 100Mbps lan card. I will repeat it – 100 Mbps. So, I can’t stream 120Mbps videos, its ok. The TV doesn’t support suck videos. FYI my 5 years old laptop have 1G lan card. You can find 1G PCI cards for less than 10E in ebay.

Bottom line

The qled tv is far away from a “smart tv”. The lack of apps is awful. Lack of codecs is also awful.

But the picture … its awesome!

If you are about to get the qled tv – you should also get a tv box or a pc/laptop.

Posted in no category, TV | Comments Off on Samsung QLed tv review

Installing steam on debian 9

Article last update: March 2019

I had some issues installing steam on my debian jessie, so here are the steps that worked for me.

Install required libs

Add i386

[email protected]# dpkg --add-architecture i386

Update packages data

[email protected]# apt-get update

Install required libs

[email protected]# apt install libx11-6:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 

Video card specific libs

For more information about video vard libs check

If you are using ati video card, then isntall fglrx libs

[email protected]# apt-get install libgl1-fglrx-glx:i386

For nvidia use

[email protected]# apt-get install libgl1-nvidia-glx:i386

Steam install

Download steam from the official steam website

[email protected]# dpkg -i steam_latest.deb


If you face any errors during installations, you can always try forcing the command using

apt-get -f install

Starting steam

[email protected]: steam

I think that the best way to start steam is from command line. The GUI will pop up 🙂 but you will be able to ovserver for any errors.

Posted in Debian, Linux | Tagged | Leave a comment

Propel2 criterions

Propel2 do not have mysql’s full text search support out of the box.
Of course you can do

$movies = MovieQuery::create()
    -> where('MATCH(Movie.title, Movie.director) AGAINST(? IN BOOLEAN MODE)',
             'big lebowski')
    -> find();

credits to jengeb

This doesn’t looks good for reuse. You can create a Query helper class, but it is still doesn’t looks right.

Here comes the criterions.

Criterions are something like where clauses.

Lets make quick example about in criterion

First we need the ModelCriteria. Basically this is the Query class.

There is this method called `combine`….

Combine several named criterions with a logical operator

So, we need the Criterion.

The easiest way is using the getNewCriterion method

$criterion = $modelCriteria->getNewCriterion(
   'id', // sql field
   12345, // desired value
   '=' // condition name

Then we have to add the criterion to the query. This won’t apply the criterion filter!

$modelCriteria->addCond('myCondition', $criterion);

Lets add the criterion to desired filter.


This looks too complicated, but actually it is very helpful when you are building something like API.

So, lets back to the full text search. Here is example code of full text search criterion

use Propel\Runtime\ActiveQuery\Criterion\AbstractCriterion;
use Propel\Runtime\ActiveQuery\Criteria;

 * Criterion for MySQL/MariaDB full text search
 * @author po_taka
class FullTextCriterion extends AbstractCriterion
     * Create a new instance.
     * @param Criteria $outer      The outer class (this is an "inner" class).
     * @param string   $column     ignored
     * @param string   $value      The condition to be added to the query string
     * @param string   $comparison SQL MATCH modifier
    public function __construct(Criteria $outer, $column, $value, $comparison = 'IN NATURAL LANGUAGE MODE')
        return parent::__construct($outer, $column, $value, $comparison);

     * Appends a Prepared Statement representation of the Criterion onto the buffer
     * @param string &$sb    The string that will receive the Prepared Statement
     * @param array  $params A list to which Prepared Statement parameters will be appended
    protected function appendPsForUniqueClauseTo(&$sb, array &$params)
        $field = (null === $this->table) ? $this->column : $this->table . '.' . $this->column;

        $params[] = [
            'table' => $this->realtable,
            'column' => $this->column,
            'value' => $this->value,

        $sb .= " MATCH (" . $field . ") AGAINST( :p" . count($params) . " " . $this->comparison . ") ";

This should be safe against sql injections 🙂 This is the benefit instead of using $query->where('MATCH (my_field) AGAINS "' . $param '")

Example usage

$criterion = new FullTextCriterion(
   'I\'m looking for this text :)'
$modelCriteria->addCond('myCondition', $criterion);

I was planing to release some small package for propel2, but I don’t think that anyone will ever use it :/

Posted in php | Comments Off on Propel2 criterions

MTB statistic 2017

MTB statistic 2015

1x RS pike. Yes, I broke the lyrik. I will post more detail later.

3x grips

1x shimano m8000 front brake. The elixir 7 worked fine, I just wanted to move to mineral oil.

~10x inner tubes. Used for ghetto tubeless

1x Kenny full face helmet. I did a lot of bike riding, climbing is via the lift, so width is not a problem. FF protection is ff protection 🙂

1x googles – Smith

1x backpack, Evoc FR. Excellent backpack. The old one have too many fixes.

2x tyres. Maxxis DHR II

1x shoes, Scott FR 10

Posted in mtb | Comments Off on MTB statistic 2017