Skip to content

Instantly share code, notes, and snippets.

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

Łukasz Grajewski grajewsky

🏠
Working from home
View GitHub Profile
@grajewsky
grajewsky / Nginx+php-fpm.md
Last active June 15, 2021 11:36
Production configuration fox nginx+php-fpm.md

NGINX & PHP-FPM

PHP-FPM user

The PHP-FPM user should be a special user that you create for running your website, whether it is Magento, WordPress, or anything. Its characteristics are the following:

  • This is the user that PHP-FPM will execute scripts with
  • This user must be unique. Do not reuse an existing user account. Create a separate user for each website!
  • Do not reuse any sudo capable users. If your website user is ubuntu or centos, or, root – you’re asking for much trouble.
@grajewsky
grajewsky / ivmmwwsl2.md
Last active January 7, 2021 08:10
Increse VM memory - Windows WSL2

Increse VM memory - Windows WSL2

Open powershell

> wsl -d docker-desktop

run

> sysctl -w vm.max_map_count=262144 
@grajewsky
grajewsky / linux-groups-management.md
Created November 13, 2020 11:55
Linux - Groups Management

Linux - Groups Management

1. Add Group

groupadd group_name

1. Group password

gpasswd group_name
@grajewsky
grajewsky / Linux - users mangement.md
Last active November 13, 2020 11:57
Linux - Users Mangement

Linux Users Management

1. List all users in system

> awk -F':' '{ print $1}' /etc/passwd

2. Get user id

> id {name}
@grajewsky
grajewsky / PHP 8 - build from sources.md
Last active November 4, 2020 11:17
PHP 8 compile from source

PHP8 - build from sources

Update dependencies

> sudo apt-get update
> sudo apt-get install -y libxml2-dev build-essential libgccjit-6-dev re2c bison libxml2-dev autoconf libzip-dev 

Fetch source code

repository: https://github.com/php/php-src.git

@grajewsky
grajewsky / phpunit.xml
Last active November 13, 2020 11:49
PHPUnit 9 XML
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
testdox="true"