Skip to content

Instantly share code, notes, and snippets.

View ikennaokpala's full-sized avatar
🎯
Focusing

Ikenna N. Okpala ikennaokpala

🎯
Focusing
View GitHub Profile
@ikennaokpala
ikennaokpala / README.md
Last active March 4, 2024 05:46 — forked from magnetikonline/README.md
Setting Nginx FastCGI response buffer sizes.

Nginx FastCGI response buffer sizes

By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk. This process is also explained at the Nginx ngx_http_fastcgi_module page document page.

Since disk is slow and memory is fast the aim is to get as many FastCGI responses passing through memory only. On the flip side we don't want to set an excessively large buffer as they are created and sized on a per request basis (i.e. it's not shared memory).

The related Nginx options are:

@ikennaokpala
ikennaokpala / nfs-vagrant-error.md
Last active March 8, 2024 12:54
Vagrant error :NFS is reporting that your exports file is invalid

Vagrant error :NFS is reporting that your exports file is invalid

==> default: Exporting NFS shared folders...
NFS is reporting that your exports file is invalid. Vagrant does
this check before making any changes to the file. Please correct
the issues below and execute "vagrant reload":

exports:2: path contains non-directory or non-existent components: /Users/<username>/path/to/vagrant
exports:2: no usable directories in export entry
exports:2: using fallback (marked offline): /
sudo apt-get update -y && sudo apt-get install imagemagick -y && sudo apt-get install php5-imagick -y && sudo add-apt-repository ppa:dhor/myway -y && sudo apt-get update -y && sudo apt-get install graphicsmagick -y && sudo apt-get install libgraphicsmagick1-dev -y && sudo pecl install gmagick-1.1.1RC1
sudo vim /etc/php5/fpm/php.ini
extension=/usr/lib/php5/20121212/gmagick.so
extension=/usr/lib/x86_64-linux-gnu/ImageMagick-6.7.7/modules-Q16/coders/magick.so
extension=/usr/lib/php5/20121212/imagick.so
/home/gfb/app/wp/wp-content/ewww
@ikennaokpala
ikennaokpala / index-with-redis.php
Created April 12, 2016 16:15 — forked from JimWestergren/index-with-redis.php
Redis as a Frontend Cache for WordPress
<?php
/*
Author: Jim Westergren & Jeedo Aquino
File: index-with-redis.php
Updated: 2012-10-25
This is a redis caching system for wordpress.
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/
sudo update_engine_client -update
#!/bin/bash
sudo mkdir -p /opt/bin
#sudo curl -L `sudo curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.7.0-rc1/docker-compose-`uname -s`-`uname -m` > docker-compose
sudo chmod +x docker-compose
sudo mv docker-compose /opt/bin
- Login to robots backend
- Activate rescue mode and obtain the rescue password.
- Restart system to boot into rescue mode via Network/DHCP
- ssh x.x.x.x -l root
- Edit the following script to add your ssh key or list of ssh keys indented line by line starting with a dash
@ikennaokpala
ikennaokpala / conn_ip_addresses.sh
Created March 8, 2016 21:27
Connected IP addresses to a server
netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
@ikennaokpala
ikennaokpala / .fishrc
Created February 28, 2016 17:33 — forked from chadrien/.fishrc
My fishrc
# vim: ft=fish
function __fish_init_boot2docker_env
for dockerVar in (boot2docker shellinit 2>/dev/null | sed -e 's/export/set -xU/' -e 's/=/ /');
eval $dockerVar
end
end
function boot2docker
command boot2docker $argv
if test "$argv[1]" = "up"