Skip to content

Instantly share code, notes, and snippets.

Matthew Setter settermjd

Block or report user

Report or block settermjd

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
@settermjd
settermjd / cache-config.php
Created Oct 30, 2015
Cache configuration showing how to configure Zend\Cache to work with Redis.
View cache-config.php
<?php
if (extension_loaded('redis')) {
return [
'caches' => [
'Cache\Transient' => [
'adapter' => 'redis',
'ttl' => 60,
'plugins' => [
@settermjd
settermjd / app -> config -> sculpin_kernel.ml
Last active Oct 5, 2015
Creating a custom type in Sculpin
View app -> config -> sculpin_kernel.ml
sculpin_content_types:
posts:
permalink: pretty
portfolios:
enabled: true
@settermjd
settermjd / database-schema.sql
Created Sep 22, 2015
Query across multiple databases in MySQL
View database-schema.sql
DROP TABLE IF EXISTS `departments`;
CREATE TABLE `departments` (
`dept_no` char(4) NOT NULL,
`dept_name` varchar(40) NOT NULL,
PRIMARY KEY (`dept_no`),
UNIQUE KEY `dept_name` (`dept_name`),
KEY `idx_deptno` (`dept_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `dept_emp`;
@settermjd
settermjd / DummyDateCalculator.php
Created Jul 24, 2015
Issue with using a factory to retrieve a service in PHP-DI
View DummyDateCalculator.php
<?php
namespace DiExample;
class DummyDateCalculator
{
protected $date;
protected $secondDate;
public function __construct(\DateTime $date)
View DummyDateCalculator.php
<?php
namespace DiExample;
class DummyDateCalculator
{
protected $date;
protected $secondDate;
public function __construct(\DateTime $date)
@settermjd
settermjd / Powerful, Flexible, Maintainable SQL Generation - Without The Hassle.md
Last active Aug 29, 2015
Powerful, Flexible, Maintainable SQL Generation - Without The Hassle
View Powerful, Flexible, Maintainable SQL Generation - Without The Hassle.md

PHP is almost synonymous with databases, and has been since the early versions. Yet creating SQL queries can still be a challenging task. What's the right tool to use? ORMs often feel like overkill. And creating queries by hand can be unmaintainable. In this session, I'll show you how to use the Zend\Db library to generate SQL queries; from simple selects, through to more complex unions, filtered deletions, and updates. You'll learn how to use the library to create flexible, secure, maintainable, and reusable queries quickly, and efficiently, saving you time and effort in the long term.

@settermjd
settermjd / Want a Stellar Project? You Need to Document and Promote It.md
Last active Aug 29, 2015
Want a Stellar Project? You Need to Document and Promote It
View Want a Stellar Project? You Need to Document and Promote It.md

Do you have an awesome WordPress plugin, Drupal module, Zend Framework module, or PHP library, one that you want people to use, to be truly successful, perhaps one people even rave about? Often, most of the effort expended on a project goes in to development, with documentation and promotion considered after-thoughts. But these two steps are essential to a project's success. In this session, I'll show you key ways to document and promote your project, so it's easier to find out about, to start using, to maintain, and to grow its reputation, using examples of real world successes.

@settermjd
settermjd / Building a Virtual Business.md
Last active Aug 29, 2015
Building a Virtual Business
View Building a Virtual Business.md

Ever dreamed of being your own boss? We often think that building a business involves a lot of money and time (and it does). There are also innumerable software applications to handle countless day-to-day processes; whether that's accounting, project management, time tracking, and so on.

In reality however, its not that difficult to spin up infrastructure to support routine business tasks. Whether you're starting out as a freelancer, or building a fully-fledged business, replete with employees and payroll, there are services and apps to help.

In this session, I'll show you the key applications you need to start and build a successful business, on a virtual shoestring. Along the way, I'll share what I've learned building my own programming and writing business, when it comes to working with clients, getting paid, and managing projects and tasks.

View README.md
View ZF2 Setup.php
<?php
/**
* This class allows the Controller to be instantiated as a factory by the ServiceManager
*/
namespace BabyMonitor\Controller\Factories;
use Zend\ServiceManager\FactoryInterface,
Zend\ServiceManager\ServiceLocatorInterface,
Monitor\Controller\MonitorController;
You can’t perform that action at this time.