Skip to content

Instantly share code, notes, and snippets.

View asamofal's full-sized avatar
🇺🇦

Anton Samofal asamofal

🇺🇦
View GitHub Profile
@idecardo
idecardo / homestead-manual-install.md
Last active November 16, 2023 08:34
Laravel Homestead Manual Installation

Getting Started

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine. Read more...

Download

Download homestead box:

@ultim8k
ultim8k / vim-multiline-comment.md
Last active October 18, 2024 09:40
(un) comment multiple lines vim

From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim

For those tasks I use most of the time block selection.

Put your cursor on the first # character, press Ctrl``V (or Ctrl``Q for gVim), and go down until the last commented line and press x, that will delete all the # characters vertically.

For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V, and select until the last line. Second, press Shift``I``#``Esc (then give it a second), and it will insert a # character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/# in the second step instead.

@holmberd
holmberd / php-pools.md
Last active September 25, 2024 05:44
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
@dshadow
dshadow / preseed.cfg
Last active November 12, 2019 10:32
preseed.cfg
d-i debian-installer/locale string uk_UA
d-i localechooser/supported-locales multiselect en_US.UTF-8, en_US
d-i keymap select ua
d-i keyboard-configuration/modelcode string pc105
d-i keyboard-configuration/toggle select Alt+Shift
d-i keyboard-configuration/layoutcode string us,ru,ua
d-i keyboard-configuration/xkb-keymap select ua