Skip to content

Instantly share code, notes, and snippets.

@SocalNick
SocalNick / GitHub.md
Created March 20, 2023 22:39
User Story Template

Why

As an I want So that

Acceptance Criteria

Given When Then

@SocalNick
SocalNick / keybase.md
Created September 12, 2017 00:10
Keybase verification

Keybase proof

I hereby claim:

  • I am socalnick on github.
  • I am socalnick (https://keybase.io/socalnick) on keybase.
  • I have a public key ASCnJDFlZZveOugG_n3STOR0u6AeH5-wtdVX5c9lN25vkQo

To claim this, I am signing this object:

@SocalNick
SocalNick / clock.rb
Created June 4, 2013 00:10
Clockwork + IronMQ
require 'clockwork'
require 'iron_mq'
module Clockwork
configure do |cofig|
config[:tz] = "America/Los_Angeles"
end
handler do |job|
var Poller, imq, imqClient, EventEmitter, util;
imq = require('iron_mq');
imqClient = new imq.Client();
EventEmitter = require('events').EventEmitter;
util = require('util');
Poller = function Poller(queueName) {
// setup instance vars
this.queueName = queueName;
this.queue = imqClient.queue(this.queueName);
@SocalNick
SocalNick / query_smt.js
Created April 24, 2013 14:43
Some IronMQ and process control with Node.js
var iron_mq = require('iron_mq');
var imq = new iron_mq.Client();
var queueName = "query_smt";
var queue = imq.queue(queueName);
var numMessagesCurrentlyProcessing = 0;
process.on( 'SIGINT', function() {
var num;
console.log( 'Received SIGINT (Crtl-C)')
@SocalNick
SocalNick / Module.php
Created November 10, 2012 01:06
Initialize Session Oddity
<?php
namespace Application;
use Zend\ModuleManager\ModuleManager;
use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
class Module
{
<?php
define('ZF2_PATH', realpath(__DIR__ . '/../vendor/ZendFramework/library'));
@SocalNick
SocalNick / module.config.php
Created July 19, 2012 18:39
View Strategy config
<?php
return array(
'view_manager' => array(
'display_not_found_reason' => false,
'display_exceptions' => false,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
@SocalNick
SocalNick / filterChain.php
Created June 27, 2012 18:23
ZF2 FilterChain Sample Configuration
<?php
// Convert "socalnick.dev.phantom.www.ign.com" or "www.ign.com" to "WwwIgnCom"
$filter = new Zend\Filter\FilterChain(array(
'filters' => array(
array(
'name' => 'pregReplace',
'options' => array(
'match' => '/^(.*phantom\.)?([^:]+)(:\d+)?$/i',
'replace' => '$2',
),
@SocalNick
SocalNick / module.config.php
Created June 26, 2012 16:22
ZF2 Sample Application Configuration for compiled Di
<?php
return array(
// Other component configuration (i.e. router, controller, view_manager
'di' => array(
'definition' => array(
'runtime' => array(
'enabled' => false,
),