Skip to content

Instantly share code, notes, and snippets.

Kingsley Felix iamkingsleyf

Block or report user

Report or block iamkingsleyf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomazzaman
tomazzaman / hhvm.conf
Last active Dec 31, 2018
Monit configurations for commonly used services
View hhvm.conf
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout
@janikvonrotz
janikvonrotz / Install WordPress Blog.md
Created Mar 3, 2014
Step by Step: Install WordPress Blog #PHP #MySQL #Nginx #phpMyAdmin #WordPress #Markdown #Ubuntu
View Install WordPress Blog.md

Finishing this guide you'll get:

  • A running WordPress installation
  • Nginx proxy with PHP and Fast CGI
  • MySQL server accessible with phpMyAdmin

Specification of latest running installation:

  • Date: 03.03.2014
@dlsniper
dlsniper / tutorial.md
Last active Jul 30, 2018
How to build nginx from sources on Ubuntu
View tutorial.md
export LANGUAGE="en_US.UTF-8" 
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
locale-gen en_US.UTF-8 
dpkg-reconfigure locales

apt-get install unzip libpcre3 libpcre3-dev libssl-dev libpcrecpp0 zlib1g-dev debhelper dh-systemd libgeoip-dev autotools-dev libgd2-noxpm-dev libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev po-debconf libexpat-dev libxslt1-dev
@stayallive
stayallive / install.sh
Last active May 4, 2018
Install PHP 5.6.7 on Plesk 11.5 & 12 (CentOS 6)
View install.sh
#!/bin/bash
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
mkdir /php
@lukebranch
lukebranch / 4GB-4Core-VPS-my.cnf
Created Oct 22, 2014
/etc/my.cnf config for 4GB RAM 4 Core VPS - Wordpress
View 4GB-4Core-VPS-my.cnf
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name server-1 generated for Luke at 2014-10-22 09:47:40
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
View www.conf
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
@kvandenhaute
kvandenhaute / default
Last active Aug 29, 2017
Example of a default server configuration for Nginx (sites-available/default).
View default
server {
listen 80 default; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
# Make site accessible from http://localhost/
server_name localhost;
server_name_in_redirect off;
charset utf-8;
@bradyvercher
bradyvercher / cache-post-thumbnails.php
Created Jan 9, 2014
WordPress: Cache post thumbnail attachments that appear in a WP_Query loop.
View cache-post-thumbnails.php
<?php
/**
* Plugin Name: Cache Post Thumbnails
* Description: Prime the post thumbnails cache for individual loops.
* Version: 1.0.0
* Author: Brady Vercher
* Author URI: http://www.blazersix.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
View s3_drupal_backup.sh
#!/bin/bash
TMP="/tmp"
DB_USER="root"
DB_PASSWD="password"
SITES_DIR="/var/www"
S3_BUCKET="s3://bucket-name"
DATE=$(date +%Y-%m-%d)
# Backup all databases to S3
for DB in $(mysql --user=$DB_USER --password=$DB_PASSWD -e 'show databases' -s --skip-column-names|grep -Ev "^(information_schema|performance_schema|mysql)$");
@janikvonrotz
janikvonrotz / Enable Piwik geolocation support with GeoIP PECL.md
Last active Feb 13, 2017
Ubuntu: Enable Piwik geolocation support with GeoIP PECL #Piwik #Markdown
View Enable Piwik geolocation support with GeoIP PECL.md

Introduction

By default Piwik uses the provider location to guess a visitor's country based on the language they use. This is not very accurate, so they recommend installing and using GeoIP.

Requirements

  • Ubuntu server
  • libgeoip-dev
  • Nginx
  • Nginx minimal website
You can’t perform that action at this time.