Solution for CodeSignal: addTwoHugeNumbers (Linked List part 👯)

Task description on Codesignal I’ve spend decent amount of time in order to figure out that I don’t need any string manipulation in this task 😅. My first try was adding missing zeros to the beginning of number slot, convert int to str and back, then the resulting string split by 4 but no luck … It turned out that is simple math 😀 I wanna share my solution with detailed comments ⬇️ (Time complexity O(n) )...

September 10, 2020 · 3 min
cover_img_processor

How to analyse “high CPU” in php on production. Part 1

1 Add tools specifically to php monitoring in order to answer the questions ⬇️ what kind of php scripts were called most of the time? what kind of php scripts took the most CPU? We choose open-source tool Pinba. php pinba extension sends data over UDP in protobuf format. pinba server accumulates and processes data and send it to data storage in your choice. (In our case it is Clickhouse DB)...

July 10, 2020 · 3 min
xdebug.gif

XDebug for PHP docker container on macOS

Into 💆 Pre-conditions: macOS Sierra Docker CE Version 17.06.2-ce-mac27 PHP 7.1.8 XDebug v2.5.0 PhpStorm 2017.2 If you want to set up remote debug from your container you have 2 options: xdebug.remote_host = %host_ip% %host_ip% — The IP of the machine running your IDE. It’s assumed on the same host as Docker. xdebug.remote_connect_back = on checks $_SERVER[‘HTTP_X_FORWARDED_FOR’] and $_SERVER[‘REMOTE_ADDR’] variables to find out which IP address to use. You cannot use xdebug....

August 14, 2017 · 2 min

0 min