Skip to content

Instantly share code, notes, and snippets.

@oleg-andreyev
oleg-andreyev / WithConsecutive.php
Created July 20, 2023 14:50
WithConsecutive polyfill
<?php
/**
Usage: ->with(...WithConsecutive::create(...$withCodes))
*/
declare(strict_types=1);
namespace App\Tests;
@izzydoesit
izzydoesit / System Design.md
Created March 13, 2021 18:51 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@shmaltorhbooks
shmaltorhbooks / .bashrc
Last active November 20, 2024 15:25
paratest with multiple db instances
alias paratest='php bin/console test:init:database:pool -e=test 10 && vendor/bin/paratest -f -p 10 —max-batch-size 5 —coverage-html=build/coverage'
@vudaltsov
vudaltsov / FixPostgreSQLDefaultSchemaListener.php
Last active May 8, 2025 10:16
Doctrine PostgreSQL Default Schema Fix For Symfony
<?php
declare(strict_types=1);
namespace App\Doctrine\EventListener;
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
final class FixPostgreSQLDefaultSchemaListener
@afeish
afeish / md-renderer.conf
Created September 12, 2018 10:49 — forked from max-lt/md-renderer.conf
Nginx config to render markdown files (client side)
location /__special {
internal;
allow all;
root /usr/share/nginx/html/__special;
}
location = /__md_file {
internal;
allow all;
@holmberd
holmberd / php-pools.md
Last active April 29, 2025 08:29
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@insekticid
insekticid / phpcs.xml.dist
Created July 25, 2017 07:25
Custom Symfony 4 Flex PHP 7.1 strict_types=1 coding standard
<?xml version="1.0"?>
<ruleset name="Exploit.cz">
<exclude-pattern>src/Kernel.php</exclude-pattern>
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony/ruleset.xml">
<exclude name="Symfony.WhiteSpace.AssignmentSpacing"/>
<exclude name="Symfony.Commenting.ClassComment"/>
<exclude name="Symfony.Commenting.FunctionComment"/>
<exclude name="Squiz.Commenting.FunctionComment"/>
</rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml">
@TheDonDope
TheDonDope / escape.from.tarkov.keybindings.md
Last active March 18, 2025 20:24
Escape from Tarkov Keybindings

Escape from Tarkov Controls Cheat Sheet

BEGINNER'S GUIDE - ALL CONTROLS + TIPS (Escape from Tarkov)

Controls

  • Hold Shift when zoomed in with Mouse Right Click to hold breath and steady aim
  • Press B to switch between firing modes 🔥 (You will always start a raid in single fire mode)
    • The animation when switching to 🔥 🔥 🔥 fire is an ⬆️ flick
  • The animation when switching to 🔥 fire is an ⬇️ flick
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root