Skip to content

Instantly share code, notes, and snippets.

View mrsombre's full-sized avatar

Dmitrii Barsukov mrsombre

  • Montenegro
  • 20:46 (UTC +02:00)
View GitHub Profile
@mrsombre
mrsombre / snippets.sh
Last active March 14, 2019 04:41
Useful snippets
# MySQL config files
/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
# composer install
curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
@mrsombre
mrsombre / git.md
Last active September 11, 2018 03:28
GIT cheat-sheet

For example following command adds user execute permission to an arbitrary file:

git update-index --chmod=+x <file>
git ls-files --stage
git commit -m "Set exec"
@mrsombre
mrsombre / OpCache
Created March 16, 2015 07:27
Заметки о PHP
http://jpauli.github.io/2015/03/05/opcache.html
Configuring OPCache#
If you use a framework based application, like a Symfony2 based application, I strongly suggest :
you turn off revalidation mechanism on production (turn opcache.validate_timestamps to 0)
you deploy using a full new runtime of your scripts, this is the case with Symfony2 applications
you size correctly your buffers
opcache.memory_consumption, the most important
opcache.interned_strings_buffer , monitor your usage, and size accordingly, take care if you tell OPCache to save comments, which you will likely do if you use PHP "annotations" (opcache.save_comments = 1), those are strings, big strings, that will eat your interned strings buffer
@mrsombre
mrsombre / xdebug.md
Last active November 19, 2019 07:01
PHP XDebug configuration

Enable xdebug in CLI for phpstorm

export PHP_IDE_CONFIG="serverName={SERVER NAME IN PHP STORM}"
export XDEBUG_CONFIG="remote_host={YOUR_IP} idekey=PHPSTORM"
@mrsombre
mrsombre / centos
Last active March 16, 2020 00:19
CentOS VirtualBox install
=== Symlink Support in Windows
The first step is installing Polsedit - User Policies Editor. When you open it, look for Create symbolic links.
http://www.southsoftware.com/polsedit.zip
Double click the row, click Add User or Group... and look for your username in the list.
Closing the app will automatically save your choices, and you'll need to reboot your machine.
=== Updating fresh system
;; Edit /etc/yum.conf and set installonly_limit: 2
yum upgrade
reboot