15 августа 2018 г.

cakephp debug_kit table doesnt exist

Warning (512): Fixture creation for "panels" failed "SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" [CORE/src/TestSuite/Fixture/TestFixture.php, line 313] Warning (512): Fixture creation for "panels" failed "SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" [CORE/src/TestSuite/Fixture/TestFixture.php, line 313] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cakephp_debug_kit.panels' doesn't exist
Solved by changing the database/schema collation from utf8mb4 to utf8/utf8_unicode_ci

14 августа 2018 г.

Leafpad: lightweight GUI text editor for rox-filer on Openbox / Raspberry PI

I needed a lightweight file manager for an Openbox machine. rox-filer seemed like a decent option. But in order to look for and manage some config files, I needed the ability to quickly view their contents, so rox-filer alone wasn't enough, I needed a lightweight file editor too. Looking through the officially suggested options, I found leafpad. I ran most of those suggestions against apt-get install --no-install-recommends, and even with the no-recommends flag there were about 50MB of required dependencies. However, leafpad (as well as rox-filer itself) required no additional packages to be installed.

apt-get install --no-install-recommends -y rox-filer leafpad

Then go to $HOME/.config/rox.sourceforge.net/MIME-types/text and put the following inside:

LEAFPAD="$(which leafpad)"
"${LEAFPAD}" "$@"
Then you can right click pretty much any file, then choose "File 'example'" and then "Open As Text".

9 июля 2018 г.

Controlling CakePHP FriendsOfCake/bootstrap-ui checkbox/radio wrappers

CakePHP may render the inputs based on your global $this->Form preferences. This will be a problem if you just need a clean checkbox to place in a table, and have the whole row be it's label for example.

To solve, you will need to use templates. Add the following to your form options:

    'templates' => [
        'checkboxContainer' => '{{content}}',
        'checkboxFormGroup' => '{{label}}{{error}}{{help}}',
        'checkboxWrapper' => '{{label}}',
Use debug($this->Form->getTemplates()); to get a list of all available templates.

29 мая 2018 г.

What do I think is wrong with Opencart

This is supposed to be a cumulative post expressing what I feel after years of closely working with Opencart.

  • Lack of attention to detail in everything, from texts (An email with a reset link has been sent your email address) to making things future-proof. 

22 февраля 2018 г.

raspberry raspbian debian dhcp dhcpcd wicd wifi not connected

Pretty much the same issue as desceibed here:
The network shows up in the wicd-client menu, and when I click connect, it gives me the usual messages: Doyle-WiFi: Disconnecting active connections... Doyle-WiFi: Putting interface up... Doyle-WiFi: Validating authentication... Doyle-WiFi: Obtaining IP address... Doyle-WiFi: Done connecting... But it doesn't actually connect to the network, and just goes back to the default "Not connected" message.
Source: Wicd looks like it's connecting just fine, but doesn't I'm using this on a raspbian with WICD GUI installed. What helped me was going to Wicd settings, then external programs and setting the preferred DHCP client to dhclient source