Skip to content

Instantly share code, notes, and snippets.

View Bittarman's full-sized avatar

Ryan Mauger Bittarman

  • Yeovil, Somerset, UK
  • 05:44 (UTC)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bittarman on github.
  • I am bittarman (https://keybase.io/bittarman) on keybase.
  • I have a public key ASAsY620r1nKtpW3qxYZ7MJrn-MP6d_qwqFtqn1lV9XdhQo

To claim this, I am signing this object:

#!/bin/bash
#
# Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly
#
# Authors:
# Raghavendra Prabhu <[email protected]>
# Olaf van Zandwijk <[email protected]>
#
# Based on the original script from Unai Rodriguez and Olaf (https://github.com/olafz/percona-clustercheck)
#

Keybase proof

I hereby claim:

  • I am bittarman on github.
  • I am bittarman (https://keybase.io/bittarman) on keybase.
  • I have a public key whose fingerprint is 764A 04F4 946E 2AE6 99AF D760 6AB4 C03E B8FC 9145

To claim this, I am signing this object:

Client certificate authentication for NGINX

Generating CA certificate

On the server, generate the key and certificate

# openssl genrsa -des3 -out ca.key 4096

openssl req -new -x509 -days 3650 -key ca.key -out ca.crt

@Bittarman
Bittarman / php-from-source.md
Created December 18, 2013 14:37
Compiling PHP from source. (Debian system layout)

Installing / upgrading PHP

  • su into root.
  • cd to /usr/local/src
  • wget latest version, and check md5sum, then extract to current dir.
  • cd into php-X.X.X
  • Configure with the appropriate configure line below
  • make -j8 Where 8 is 2x the number of cores available.
  • make install
<?php
/**
* @copyright Lupimedia ltd 2013
*/
namespace Contentled\Filter;
use Zend\Filter\Exception;
use Zend\Filter\FilterInterface;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
<?php
class Boostrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initTimeout()
{
$auth = new Zend_Session_Namespace(Zend_Auth::getInstance()->getSessionNamespace())
$auth->setExpirationSeconds(60);
}
}
.. toctree::
   :hidden:

   ref/overview
   ref/installation
   user-guide/overview
   user-guide/skeleton-application
   user-guide/modules
   user-guide/routing-and-controllers
   user-guide/database-and-models
<?php
class Module_Form_NewSomething extends Zend_Form
{
public function init()
{
$this->addElements(array(
$name = new Zend_Form_Element_Text('name'),
$email = new Zend_Form_Element_Text('email'),
));