Skip to content

Instantly share code, notes, and snippets.

View leedavis81's full-sized avatar

Lee Davis leedavis81

View GitHub Profile
@leedavis81
leedavis81 / Session.php
Created March 16, 2012 11:31 — forked from Ocramius/Session.php
Auth Storage adapter for Zend Framework and Doctrine 2
<?php
namespace Ocramius\Auth\Storage;
use Entity\Ocramius\Admin as AdminEntity,
Doctrine\ORM\EntityManager;
/**
* An @see \Zend_Auth_Storage_Session that handles @see AdminEntity items
* @author Marco Pivetta <ocramius@gmail.com>
*/
@leedavis81
leedavis81 / composer.bat
Created September 3, 2012 14:25
Global installation of composer on windows
@ECHO OFF
php "%~dp0composer.phar" %*
@leedavis81
leedavis81 / delete-core.sh
Created October 11, 2012 16:57
Delete a solr core
#!/bin/bash
clear
echo "*************************************************************************"
echo "*************************************************************************"
echo
echo " You are about to *permanently* delete a core!"
echo " There is no going back"
echo
echo "*************************************************************************"
@leedavis81
leedavis81 / new-core.sh
Created October 11, 2012 16:58
Create a new core
#!/bin/bash
# creates a new Solr core
if [ "$1" = "" ]; then
echo -n "Name of core to create: "
read name
else
name=$1
fi
@leedavis81
leedavis81 / reload-core.sh
Created October 11, 2012 16:59
Reload a solr core
#!/bin/bash
# reloads a Solr core
if [ "$1" = "" ]; then
echo -n "Name of core to reload: "
read name
else
name=$1
fi
@leedavis81
leedavis81 / ShutdownProcess.php
Created October 17, 2012 10:05
PHP Register shutdown handler - allows unregistering
<?php
/**
* Shutdown process handler, allows you to unregister a process (not supported natively in PHP)
* Usage:
* $sd = new System_ShutdownProcess($callable);
* $sd->register() /// $sd->unregister()
* or via factory
* $sd = System_ShutdownProcess::factory($callable)->register()
*/
@leedavis81
leedavis81 / supervisord
Last active January 2, 2016 12:29
supervisord (3.0) service script for standard ubuntu installation. To be installed in /etc/init.d/supervisord. Make sure you chmod +x /etc/init.d/supervisord after writing
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $local_fs $remote_fs $networking
# Required-Stop: $local_fs $remote_fs $networking
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts supervisord - see http://supervisord.org
# Description: Starts and stops supervisord as needed - see http://supervisord.org
### END INIT INFO
SOFTWARE DEVELOPMENT AGREEMENT
THIS AGREEMENT (“Agreement”) is entered into on %date%, between %name% (“Developer”), with its principal place of business located at %developer address% and %client company name% (“Client”), with its principal place of business located at %client address% and shall be effective as of %date% (the “Effective Date”).
WHEREAS, Developer is engaged in the business of software development,
WHEREAS, Client wishes to utilize the services of Developer in connection with the development of certain software identified as projectx (the “Software”).
NOW, THEREFORE, Developer and Client agree as follows:
1. Scope of Services
Developer will perform the services described in Exhibit A (the “Work”), in order to develop and implement the Software according to specifications and completion time set forth therein. Client will cooperate with Developer’s reasonable requests for information and data necessary for the completion of the Work.
2. Term and Termination
Unless terminated as provided herei

Keybase proof

I hereby claim:

  • I am leedavis81 on github.
  • I am key (https://keybase.io/key) on keybase.
  • I have a public key whose fingerprint is FBD6 9681 782B 4A5A CFD8 709C 7C11 2018 89BA 094A

To claim this, I am signing this object:

<?php
var_dump(
$bucketName,
$this->getS3Client()->doesBucketExist($bucketName),
$this->getS3Client()->listBuckets()
);
/**
string 'ldr.kpi.dev' (length=11)