Skip to content

Instantly share code, notes, and snippets.

View TheRatG's full-sized avatar
🐭
be balanced

Vladimir Pak TheRatG

🐭
be balanced
View GitHub Profile
@TheRatG
TheRatG / ngxtop.md
Created July 31, 2017 06:34
Analyse nginx log
@TheRatG
TheRatG / doctrine_batch.md
Created August 19, 2017 08:55
Doctrine batch insert
// IMPORTANT - Disable the Doctrine SQL Logger
$manager->getConnection()->getConfiguration()->setSQLLogger(null);

while (($data = getData()) {
  $iteration++;

  $obj = new EntityObject();
  $obj->setName('henry');
 // Fill object...
#https://www.vagrantup.com/docs/synced-folders/nfs.html
```
$enable_serial_logging = false
config.vm.provider "virtualbox" do |v|
v.customize [
"storagectl", :id,
"--name", "SATA Controller",
"--hostiocache", "on"
]
@TheRatG
TheRatG / TestTidierListener.php
Created August 25, 2020 08:08
Faster PHPUnit
<?php
declare(strict_types=1);
namespace Tests\Core;
use PHPUnit\Framework\Test;
use PHPUnit\Framework\TestListener;
use PHPUnit\Framework\TestListenerDefaultImplementation;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@TheRatG
TheRatG / mailhog.sh
Created April 30, 2021 06:18
Ubuntu18 /etc/init.d/mailhog
#! /bin/sh
# /etc/init.d/mailhog
### BEGIN INIT INFO
# Provides: mailhog
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start MailHog at boot time.
# Description: Enable MailHog.
@TheRatG
TheRatG / dev_mysql.md
Created August 12, 2021 06:00
Dev mysql

Mysqld config

/etc/mysql/mysql.conf.d/mysqld.cnf

skip_log_bin = 1

innodb_buffer_pool_size = 6G
innodb_log_buffer_size = 1G
innodb_log_file_size = 2G
@TheRatG
TheRatG / mailhog.sh
Created October 24, 2022 05:55
mailhog sevice
#! /bin/sh
# /etc/init.d/mailhog
### BEGIN INIT INFO
# Provides: mailhog
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start MailHog at boot time.
# Description: Enable MailHog.