Skip to content

Instantly share code, notes, and snippets.

View paramonovav's full-sized avatar
🏠
Working from home

Anton Paramonov paramonovav

🏠
Working from home
View GitHub Profile
@eusonlito
eusonlito / 01-README.md
Last active April 2, 2025 16:51
SQLite optimization for Laravel

The SQLite optimizations must be carried out at two different times: once in a unique and permanent way for the database and another time for each connection that is made. Below are the configurations that should be made in each case.

Unique and Permanent Configurations

These configurations are set only once and affect the database persistently, meaning they do not need to be reconfigured each time a connection is established:

PRAGMA journal_mode = WAL;

Sets the database journal mode to "WAL" (Write-Ahead Logging), which improves performance in concurrent operations.

@paramonovav
paramonovav / !Как установить сфинкс.md
Created September 8, 2023 17:44 — forked from codedokode/!Как установить сфинкс.md
Как установить и настроить сфинкс.

Как установить и настроить сфинкс.

Скачиваем сфинкс (берем версию с MySQL и со стеммингом на 15 языков Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support соответствующую битности твоей ОС), распаковываем например в d:\temp\s\

На этом установка sphinx завершена. В дебиане просто делаем sudo apt-get install sphinxsearch.

Создаем таблицы:

CREATE TABLE news 

(id INT(10) AUTO_INCREMENT PRIMARY KEY, topic INT(10) NOT NULL, header VARCHAR(200) NOT NULL,

@voronkovich
voronkovich / MacOS-MAMP-MailHog.md
Last active September 15, 2024 12:13
Установка MailHog для MAMP (MacOS)

Установка MailHog для MAMP (MacOS)

  1. Установить и запустить MailHog

     brew install mailhog
     brew services start mailhog
  2. Добавить настройки в файл /Applications/MAMP/bin/php/{PHP_VERSION}/conf/php.ini

@valorin
valorin / .env.example
Last active December 24, 2024 18:18
CSP Middleware - the simple CSP middleware I use across all of my projects.
# Add to your .env.example and .env files
CSP_ENABLED=true
CSP_REPORT_ONLY=true
@paramonovav
paramonovav / gist:0216ffc5dad470f1d54ea9b860ef9c66
Last active July 21, 2020 21:52
Оптимизация загрузчика Composer

Уровень 1: Генерация карты классов Как?

Есть несколько способов это сделать:

Добавить "optimize-autoloader": true в ваш composer.json; Выполнить install или update с флагом -o или --optimize-autoloader; Выполнить dump-autoload с флагом -o или --optimize; Что произойдет?

@arthursalvtr
arthursalvtr / add-custom-mail-driver-to-laravel.md
Last active April 5, 2024 17:43
Add Custom Mail Driver to Laravel

How to add custom Mail Driver to Laravel

Tested on Laravel 5.8

Within the source code of laravel 5.8 at this time of writing, we have this following

<?php

namespace Illuminate\Support;
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 29, 2025 12:18
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@linuxkathirvel
linuxkathirvel / mysql57-in-centos7.md
Last active January 14, 2025 07:44
Install MySQL 5.7 in CentOS7/RHEL7

MySQL 5.7 installation in CentOS 7

sudo su

# Remove MariaDB packages
yum list installed | grep -i maria
yum remove mariadb.x86_64
yum remove mariadb-libs.x86_64

# Download MySQL 5.7 RPM tar
@jpickwell
jpickwell / install-redis.sh
Last active May 14, 2024 07:38 — forked from khelll/install-redis.sh
Installing Redis 5.0.0 on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=5.0.0
@mendozao
mendozao / clamav-mac.md
Last active March 12, 2025 22:01 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd daemon, you'll need a copy of the ClamAV databases.

Inside /your/location/to/brew/etc/clamav, you'll see 2 files: