Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Mauger Bittarman

View GitHub Profile
View keybase.md

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:

View clustercheck
#!/bin/bash
#
# Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly
#
# Authors:
# Raghavendra Prabhu <raghavendra.prabhu@percona.com>
# Olaf van Zandwijk <olaf.vanzandwijk@nedap.com>
#
# Based on the original script from Unai Rodriguez and Olaf (https://github.com/olafz/percona-clustercheck)
#
View keybase.md

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:

View Nginx-client-certificate-auth.md

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 Dec 18, 2013
Compiling PHP from source. (Debian system layout)
View php-from-source.md

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
View FormatActivationKey.php
<?php
/**
* @copyright Lupimedia ltd 2013
*/
namespace Contentled\Filter;
use Zend\Filter\Exception;
use Zend\Filter\FilterInterface;
View gist:6269608
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;
View gist:5662725
<?php
class Boostrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initTimeout()
{
$auth = new Zend_Session_Namespace(Zend_Auth::getInstance()->getSessionNamespace())
$auth->setExpirationSeconds(60);
}
}
View index.rst
.. 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
View gist:346341
<?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'),
));
You can’t perform that action at this time.