Ninja 400 vs Duke 390

I know that Kawasaki ninja 400 and KTM duke 390 are very different bikes, but this is what I have and I will provide some differences between the two. Actually the duke 390 is my wife’s motorcycle. So, the ninja is 2019 model, second hand, 12k km. The the Duke is 2019 model, brand new.


The ninja 400 have some analog displays. The duke is full digital. For me the ninja 400 have better looking displays. But the KTM is more useful. There is so much data in this display. For example I can have range, fuel consumption, rpm, speed, average trip speed, battery level and more at the same time! You also have setting when the RPM bar should change its color and when to blink.

The RPM display on the ninja is bad. I don’t know why kawasaki decided to have white rpm numbers and white arrow.

High beam change on the duke is done via the “flash” button. You can push it to the right and the high beam will turn on. To turn the high beam off you have to push the same button to the left. If you pull this button then the high beam will only flash. The ninja have the same button for the flash. But the high beam button is located above the turn signals. I found the KTM solution better.


The ninja seat height is much lower compared to the duke 390. I can put my both feet solid on the ground. On the KTM I’m stepping on my toes. I can’t decide if one is bad and the other is better. The ninja is more aerodynamic, but the KTM allow small off-road.

The KYM seat is so hard. It is like you are sitting on a wood bench. The ninja seat is the “soft version” and I found it too soft. I prefer harder ones, like the duke’s seat.

My Duke doesn’t have windshield. Speed over 90 kph feels like you are flying. I don’t have such issue with the ninja and 120+kph.

In my opinion the ninja accelerate faster. It also revs higher. ~10k redline for the duke vs 12k for the ninja.

Fuel tank of the ninja is wider. The duke have narrowed and taller fuel tank. I’m not sure which one is better.


Duke is the winner. No second options. You can see so much in the Duke’s mirrors.

Storage space

The ninja have much more, like x3 times more storage capacity compared to the duke.

Starting the bile

The Duke is fully electronic. You need to press the button for 0.0001 seconds and the electronics will do the rest. The ninja require to hold the “start” button pressed until the bike starts. It need like a seconds.


The Duke looks better for first bike. It is also more comfortable for city driving. Anyway, ninja is my choice. If I have to pick again, the ninja will my choice again.

Posted in no category | Leave a comment

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

root@debian# dpkg --add-architecture i386

Update packages data

root@debian# apt-get update

Install required libs

root@debian# 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

root@debian# apt-get install libgl1-fglrx-glx:i386

For nvidia use

root@debian# apt-get install libgl1-nvidia-glx:i386

Steam install

Download steam from the official steam website

root@debian# 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

user@debian: 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