Skip to content

Instantly share code, notes, and snippets.

View maraloon's full-sized avatar

mara maraloon

  • Saint Peterburg
  • 16:22 (UTC +03:00)
View GitHub Profile
@maraloon
maraloon / alternative-terminal-command-name.md
Last active December 29, 2021 23:07
Add alternative terminal command name

Add alternative terminal command name

Problem: nnn use linux trash-put command to move files to trash (if NNN_TRASH=1). There is no such command in macOS, but we can install trash - same, but different name.

First decision is to add shell command with right name – trash-put calling trash inside and add it to PATH. For unknown reason it didn’t work for me –

❯ ./trash-put
Specify at least one path

Избыточные названия классов

Меня удивляет одна общая практика в мире php. Возможно это есть и в других яп, не знаю. Буду говорить за php

Практика эта - избыточное наименнование классов. Пример: SberbankPaymentApiService Если посмотреть так, то очень хорошее название, по которому сразу понятно, за что класс отвечает.

Но! В каком неймспейсе/директориях обычно располагают такой класс? Ну например в Laravel. Обычно это получается примерно так App/Service/Api/Payment/SberbankPaymentApiService