Skip to content

Instantly share code, notes, and snippets.

View RobinHoutevelts's full-sized avatar

Robin Houtevelts RobinHoutevelts

  • Leuven, Belgium
  • 13:27 (UTC +02:00)
View GitHub Profile
@holmberd
holmberd / php-pools.md
Last active November 13, 2025 10:56
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
@MattiJarvinen-BA
MattiJarvinen-BA / agnoster.zsh-theme
Last active April 23, 2021 06:44
Got tired of too long ZSH directory names with oh-my-zsh agnoster theme. To be placed in .oh-my-zsh/custom/themes/agnoster.zsh-theme
source $ZSH/themes/agnoster.zsh-theme
# Dir: current working directory
# %1 for one dir
# %2 for 2 you get it eventually
prompt_dir() {
prompt_segment blue black '%1~'
}
PROMPT='%{%f%b%k%}$(build_prompt) '
@Lorentz83
Lorentz83 / acd_cli_bash_completion
Created September 2, 2015 15:55
bash completion scripts
_acd_cli()
{
COMPREPLY=()
local CURR=${COMP_WORDS[COMP_CWORD]}
local PREV=${COMP_WORDS[COMP_CWORD-1]}
local COMMAND=${COMP_WORDS[1]}
local COMPLETEDARGNUM=$((COMP_CWORD - 2))
_acd_cli_in_set() { # checks if $1 is equal to any of the following parameters
@sshtmc
sshtmc / ubuntu-configure-sendmail-with-gmail
Created October 25, 2012 12:24
Ubuntu sendmail using smtp.gmail.com
#!/bin/bash
HOST=$(hostname)
function install_postfix() {
echo | sudo debconf-set-selections <<__EOF
postfix postfix/root_address string
postfix postfix/rfc1035_violation boolean false
postfix postfix/mydomain_warning boolean
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128