Skip to content

Instantly share code, notes, and snippets.

View yaleksandr89's full-sized avatar
💭
Debes, ergo potes

Александр Юрченко yaleksandr89

💭
Debes, ergo potes
View GitHub Profile
@yaleksandr89
yaleksandr89 / yandex-browser-ubuntu-26.04-hls-libffmpeg-fix
Created June 9, 2026 14:43
Fix HLS video in Yandex Browser on Ubuntu 26.04: Ffmpeg not found, libffmpeg.so, update_codecs
# Яндекс Браузер в Ubuntu 26.04 не воспроизводит HLS-видео: Ffmpeg not found / libffmpeg.so — решение
Короткая памятка для Ubuntu 26.04.
Ситуация: Яндекс Браузер открывает страницу с HLS-видео, плеер отображается, поток вроде пытается загрузиться, но вместо картинки появляется ошибка про отсутствующий видеокодек.
Например:
```text
Отсутствует видеокодек.
```sql
CREATE USER 'login'@'localhost' IDENTIFIED BY 'pass';
GRANT SELECT,UPDATE,INSERT ON dbname.* TO 'login'@'localhost';
GRANT ALL PRIVILEGES ON dbname.* TO 'login'@'localhost';
FLUSH PRIVILEGES;
```
Если: An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
То: ALTER USER 'zabbix_yurchenko'@'localhost' IDENTIFIED WITH mysql_native_password BY 'zabbix_yurchenko';
Create repository
```bash
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
```
Add remote repo in the local project
```bash
git remote add origin git@github.com:USER/REPO.git
> Если при перезапуске, старте или остановке Mariadb зависает на [Notice] Waiting for page_cleaner, то необходимо в консоле прописать:
https://forum.manjaro.org/t/computer-does-not-shut-down-because-of-mariadb/81565/8
```bash
timedatectl set-local-rtc 1
```
или
Если при открытие текстовыхъ файлов в редакторе gedit, появляются знаки вопроса вместо текста необходимо:
1) В консоли:
gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['UTF-8', 'WINDOWS-1251', 'CURRENT', 'ISO-8859-15', 'UTF-16']"
или
20 Установить dconf(sudo apt-get install dconf-tools), перейти в '/org/gnome/gedit/preferences/encodings/' и добавить:
'UTF-8','WINDOWS-1251','CURRENT','ISO-8859-15','UTF-16'
Resolve:
chmod -R guo+w storage
php artisan cache:clear
/etc/mysql/
my.conf
Add to appropriate sections:
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
init-connect="SET NAMES utf8"
1. cd path/to/project-B
2. git remote add project-a path/to/project-A
3. git fetch project-A
4. git merge --allow-unrelated-histories project-a/master # or whichever branch you want to merge
5. git remote remove project-A #опционально, если удалить репу коммиты остануться - названия веток нет.
// "Подсвечиваем" выбранный метод доставки (добавляем класс .shipping-method--active)
// #simplecheckout_shipping - ближайщий статический элемент, который не изменяется при выполнение aJax
var activeInputShippingMethod = $('.shipping-method').find('input:checked');
var activeShippingMethod = activeInputShippingMethod.parents('.shipping-method');
activeShippingMethod.toggleClass('shipping-method--active');
$('#simplecheckout_shipping').on('change', '.shipping-method', function () {
function lazySelectActiveItem_ShippingMethod(){
var activeInputShippingMethod = $('.shipping-method').find('input:checked');
var activeShippingMethod = activeInputShippingMethod.parents('.shipping-method');
<?php
private function exists($newEmployee)
{
foreach ($this->products as $product) {
if ($product === $newEmployee) { // сравниваем через ===
return true;
}
}
return false;
}