Notes

Arrays

Security notes, SOC lab write-ups and tested code by Mahir Faysal, a SOC Level 1 cybersecurity learner in Bangladesh, plus notes from my Next.js and Gemini projects. Sample posts are marked and drafts stay in the admin area.

PHP Sort Multidimensional Array by Value (usort, Tested)
Coding tips

PHP Sort Multidimensional Array by Value (usort, Tested)

usort($rows, fn($a, $b) => $a['grade'] <=> $b['grade']) sorts by one column. Descending, several columns, UK dates, case-insensitive names, keeping keys and array_multisort.

October 7, 2026 · 17 min read · 45 views

JavaScript Sort Array of Objects by Property (Tested)
Coding tips

JavaScript Sort Array of Objects by Property (Tested)

Pass sort() a compare function: a.price - b.price for numbers, a.name.localeCompare(b.name) for strings. Dates, multiple properties, toSorted() and the mistakes to avoid, all tested.

October 6, 2026 · 20 min read · 28 views

JavaScript map, filter and reduce Explained
Coding tips

JavaScript map, filter and reduce Explained

JavaScript map, filter and reduce explained with practical examples: transform, keep and combine array items, chain them, and avoid the classic mistakes.

October 2, 2026 · 11 min read · 87 views

0%