Skip to content

Instantly share code, notes, and snippets.

Chris Meller chrismeller

Block or report user

Report or block chrismeller

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
View gist:4747105
[www]
pm.status_path = /status
View gist:4747102
[www]
listen = /var/run/php5-fpm.socket
@chrismeller
chrismeller / gist:4746697
Created Feb 9, 2013
Default php-fpm.conf on Ubuntu
View gist:4746697
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamicaly changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
@chrismeller
chrismeller / ping.conf
Created Feb 9, 2013
My PHP-FPM pool.d config files.
View ping.conf
[www]
ping.path = /ping
View gist:6736979
id,user_id,type_id,severity_id,message,data,timestamp,ip
27643,1,28,6,"PDOStatement::execute(): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "habari__commentstatus" does not exist
LINE 1: SELECT id, name FROM habari__commentstatus;
^ in system/classes/databaseconnection.php:292",,1380326701,208.30.96.37
27644,1,28,6,"array_flip() expects parameter 1 to be array, boolean given in system/classes/comment.php:494",,1380326701,208.30.96.37
27646,1,28,6,"array_flip() expects parameter 1 to be array, boolean given in system/classes/comment.php:530",,1380326701,208.30.96.37
27647,1,28,6,"PDOStatement::execute(): SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "habari__commentstatus" does not exist
LINE 1: SELECT id, name FROM habari__commentstatus;
^ in system/classes/databaseconnection.php:292",,1380326701,208.30.96.37
27648,1,28,6,"array_flip() expects parameter 1 to be array, boolean given in system/classes/comment.php:494",
@chrismeller
chrismeller / wxr-parser.php
Last active Dec 13, 2015
Crappy WXR Parser using PHP DOM
View wxr-parser.php
<?php
date_default_timezone_set('UTC');
error_reporting(-1);
ini_set('display_errors', true);
$file = '/Users/chris/Downloads/wordpress-wxr-example.xml';
View gist:4748208
server {
# the same as for non-ssl, except we indicate that when listening on port
# 443, it should use ssl
listen [::]:443 ssl;
server_name blog.chrismeller.com new.chrismeller.com;
# specify the certificate (chain) and key file to be used for this vhost
ssl_certificate ssl/chrismeller.com.2012.pem;
ssl_certificate_key ssl/chrismeller.com.2012.key;
View gist:4748175
server {
# we want to listen on port 80 on all IPs on our system - both IPv4 and IPv6
listen [::]:80;
# our primary server name is the first, aliases simply come after it. you can also include wildcards like *.example.com
server_name blog.chrismeller.com new.chrismeller.com;
# where are our site files stored?
root /media/www/public_html/blog.chrismeller.com/public;
# define our access and error logs for this vhost
View gist:4748101
client_max_body_size 32m;
@chrismeller
chrismeller / gist:4748080
Created Feb 10, 2013
Nginx php-fpm.conf
View gist:4748080
upstream php {
server unix:/var/run/php5-fpm.socket;
}
# make sure index.php is first in all our vhosts
index index.php index.html index.htm;
You can’t perform that action at this time.