Заметки разработчика
banner
www.dev-notes.ru
Заметки разработчика
@www.dev-notes.ru
Заметки о Frontend, Backend и немного DevOps. В основном о PHP, Laravel, JavaScript, CSS, тестировании кода и настройке серверов.
Тред: 5 фишек про агрегатные функции в #SQL, которые должен знать каждый:
June 11, 2025 at 7:36 AM
Reposted by Заметки разработчика
Any website/ app that pulls this crap 🤮 is to be avoided like the plague. It's yucky and stupid. Meta does it & it doesn't even fucking work well, though they have all the money; it's full of people posting they got locked out of their accounts in spite of posting real selfies/ videos of themselves.
March 16, 2025 at 11:16 AM
Reposted by Заметки разработчика
New release: Eleventy 🛎️ Dev Server v2.0.7 includes bug fixes for CSS reloads, supports returning a `Response` in your onRequest callbacks (easily proxy to a different server using `fetch()`), and a bunch of other goodies!
Release Eleventy Dev Server v2.0.7 · 11ty/eleventy-dev-server
Adds support for Response objects returned from onRequest callbacks, simplifying usage with Fetch and unlocks easy-to-configure proxy server behavior #9 Fixes bug with requests to server while it i...
github.com
March 14, 2025 at 9:07 PM
Reposted by Заметки разработчика
🚀The customizable select was just released in Chrome 134 🤩! I’ve been playing around with this feature for quite some time and am excited to start a series. In this part1 history, trickery and how to progressively style a select element. 🥰

utilitybend.com/blog/the-cus...
The customizable select - Part one: history, trickery, and styling the select with CSS | utilitybend
Exploring customizable select elements. This series explores styling possibilities. The first article covers the history and provides a guide to building a custom select as a progressive enhancement. ...
utilitybend.com
March 13, 2025 at 11:32 AM
Reposted by Заметки разработчика
Cursed styling

textarea[style='height: 300px'] {
height: 80vh !important
}

#CSS
March 10, 2025 at 7:07 PM
Reposted by Заметки разработчика
🚀 ESLint now officially supports linting CSS!

Read more:
eslint.org/blog/2025/02...
ESLint now officially supports linting of CSS - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
eslint.org
February 18, 2025 at 4:52 PM
💡Отключение привязки к области видимости

Laravel предполагает, что вложенные модели маршрутов связаны друг с другом, то есть он будет автоматически применять отношения parent-child. Можно отключить привязку к области видимости с помощью метода `withoutScopeBindings` 🚀.

#Laravel #Route #tips
February 17, 2025 at 5:09 AM
Reposted by Заметки разработчика
Rainbow Selection in CSS

::selection is cool, but scoping it to selectors like :nth-child(5n+2) is even more fun, especially on a love filled ay like Valentine's Day.
Rainbow Selection in CSS
::selection is cool, but scoping it to selectors like :nth-child(5n+2) is even more fun, especially on a love filled ay like Valentine's Day.
frontendmasters.com
February 15, 2025 at 8:39 AM
Три подхода к селектору `&` (амперсанд) в CSS

`&` — мощное дополнение к CSS, позволяющее создавать селекторы без повторений и способствующее улучшению организованности и понимания кода.

#Frontend #CSS #Nesting

www.dev-notes.ru/articles/css...
Три подхода к селектору & (амперсанд) в CSS
& — мощное дополнение к CSS, позволяющее создавать селекторы без повторений и способствующее улучшению организованности и понимания кода.
www.dev-notes.ru
February 12, 2025 at 4:35 AM
Reposted by Заметки разработчика
Add headings to #HTML landmarks: "Some accessibility improvements are invisible to the sighted eye. One of my favorite lessons learned last year was all about invisible headings in HTML landmarks." #a11y
Add headings to HTML landmarks / Marijke Luttekes
Use visually hidden headings to make your website easier to navigate.
marijkeluttekes.dev
January 30, 2025 at 6:00 PM
Reposted by Заметки разработчика
HTML Developers: Please Consider: "By using native #HTML features, wherever practical, over ARIA, you will save yourselves and users a lot of grief and ensure that your UI work robustly across the largest number of devices." #a11y https://html5accessibility.com/stuff/2025/01/11/html-developers-plea…
HTML Developers: Please Consider – in the year of 2025 – HTML Accessibility
html5accessibility.com
January 30, 2025 at 8:00 PM
💡 Совет по Laravel: Лимитирование заданий

Вам когда-нибудь требовалось ограничить количество заданий? Чтобы не перегружать API или ограничить пользователей бесплатного тарифного плана от выполнения большого количества заданий, Laravel позволяет определять лимиты и использовать их из коробки 🚀.
Laravel Tip 💡: Rate Limit Jobs

Have you ever needed to rate-limit a job? Whether to avoid overwhelming an API or to limit free plan users from running too many jobs, Laravel allows you to define rate limiters and use them out of the box 🚀

#laravel
January 27, 2025 at 5:05 AM
💡 Совет по Laravel: Сообщения высшего порядка с `Conditionable`

Если используете трейт `Conditionable` в своих классах или работаете с классом `Conditionable`, таким как `Str`, можете использовать сообщения высшего порядка для ещё более гибкого API 🚀.

#laravel
Laravel Tip💡: Higher Order Messages with Conditionables

If you are using the Conditionable trait in your classes or working with a Conditionable class like "Str", you can make use of higher order messages for an even more fluent API 🚀

#laravel
January 27, 2025 at 4:58 AM
💡 Совет по Laravel: Подтверждение пароля пользователя

Некоторые действия, например, удаление аккаунта, могут потребовать от пользователя подтверждения пароля. Хотя эту логику можно реализовать самому, Laravel поставляется с правилом валидации, `current_password`, предназначенным именно для этого 🚀.
Laravel Tip💡: Confirm User Password

Certain actions like deleting an account might require users to confirm their password. While you could implement this logic manually, Laravel ships with a built-in validation rule, current_password, to do exactly that 🚀

#laravel
January 27, 2025 at 4:53 AM
💡 Совет по Laravel: Запуск запланированных команд на одном сервере

Запускаете приложение на нескольких серверах? По умолчанию запланированные команды будут выполняться на всех серверах, что не нужно и может вызвать проблемы. Это можно предотвратить, используя параметр `onOneServer` 🚀.

#laravel
Laravel Tip 💡: Run Scheduled Commands on a Single Server

Running your app on multiple servers? By default, scheduled commands will execute on all servers, which is unnecessary and can cause issues. You can prevent this by using the "onOneServer" 🚀

#laravel
January 27, 2025 at 4:48 AM
💡 Совет по Laravel: Проверка, является ли строка URL

Вам когда-нибудь требовалось проверить, является ли строка валидным URL? Это можно сделать вручную, но в Laravel есть метод `isUrl`, позволяющий сделать именно это. Можно пойти дальше и проверить наличие различных протоколов 🚀.

#laravel
Laravel Tip💡: Check If a String Is a URL

Have you ever needed to check if a given string is a valid URL? While you could do this manually, Laravel ships with the "isUrl" method to do exactly that. You can even take it a step further and check for various protocols 🚀

#laravel
January 27, 2025 at 4:43 AM
Reposted by Заметки разработчика
Laravel Tip💡: The "distinct" Validation Rule

Have you ever needed to check if an array contains duplicate values? While you can do this manually, it can get slightly messy. Instead, you can use the "distinct" validation rule to do exactly this 🚀

#laravel
January 1, 2025 at 8:07 PM
Reposted by Заметки разработчика
Laravel Tip💡: Useful Loop Properties

When working with loops in Blade, you may need to check for odd iterations or calculate the remaining ones to adjust your UI. While you can do this manually, the "loop" variable has properties for almost everything you need 🚀

#laravel
December 29, 2024 at 7:12 PM
Reposted by Заметки разработчика
Laravel Tip💡: Update Pivot Columns

Have you ever needed to update a pivot column? While you can manually handle this with the query builder, Laravel ships with the "updateExistingPivot" method to do exactly that 🚀

#laravel
December 25, 2024 at 6:50 PM
Reposted by Заметки разработчика
Chrome 133 goes beta today, with some very nice CSS/UI features:

* Advanced `attr()` function
* `:open` pseudo
* Scroll State Container Queries
* `text-box`, `text-box-trim`, and `text-box-edge`
* popover=hint
* Animation.overallProgress
* DOM state-preserving move
January 15, 2025 at 5:03 PM
Reposted by Заметки разработчика
#CSS margin-trim and line height units: "Learn ways of perfecting design with line height units and margin-trim."
CSS margin-trim and line height units | 12 Days of Web
Learn ways of perfecting design with line height units and margin-trim.
12daysofweb.dev
January 15, 2025 at 6:00 PM
Переменные среды играют важную роль в современной разработке, для управления конфиденциальными данными. В PHP два основных способа доступа к ним: функция `getenv` и суперглобальная переменная `$_ENV`. Хотя они выглядят взаимозаменяемыми, но ведут себя по-разному.

www.dev-notes.ru/articles/php...
Различие между PHP getenv() и $_ENV
В PHP два основных способа доступа к переменным среды: функция getenv и суперглобальная переменная $_ENV. Они ведут себя по-разному и могут создавать проблемы.
www.dev-notes.ru
January 16, 2025 at 3:26 AM
PSR-6 — стандарт PHP, обеспечивающий согласованный интерфейс для систем кэширования, делающий код гибким, эффективным и простым в сопровождении.

#PHP #PSR6

www.dev-notes.ru/articles/php...
Что такое PSR-6: Руководство по стандартам кэширования PHP
PSR-6 — стандарт PHP, обеспечивающий согласованный интерфейс для систем кэширования, делающий код гибким, эффективным и простым в сопровождении.
www.dev-notes.ru
January 14, 2025 at 4:37 AM
Reposted by Заметки разработчика
The Eleventy Super Professional Linkedin Certification Program is in full swing: www.11ty.dev/blog/certifi...
Eleventy Super Professional Linkedin Certification
An Eleventy blog post published on January 2025.
www.11ty.dev
January 13, 2025 at 3:46 PM