Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Hounddog / templatemap_generator.php
Created November 29, 2012 13:51
Template Map Generator
#!/usr/bin/env php
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@Hounddog
Hounddog / gist:2916711
Created June 12, 2012 10:08
Shell script to find if composer.lock has changed
#!/bin/sh
################################################################################
#
# Script to determine if composer.lock is updated through git and run an update
#
###############################################################################
diff=`git diff origin/master composer.lock`
echo 'Checking for Dependency Updates'
@Hounddog
Hounddog / phpcs
Created October 15, 2012 10:29
PHP Pre commit check for only changed files
#!/bin/bash
# Go to root of the repository
echo 'Checking PHPCS';
width=$(tput cols);
if [ `git rev-parse --verify HEAD` ]; then
against='HEAD'
else
@Hounddog
Hounddog / Bootstrap.php
Created July 2, 2012 10:35
Zf2 Module Testing
<?php
namespace SiteModuleTest;
use Zend\Loader\AutoloaderFactory;
use ApplicationModuleTest\ServiceManagerTestCase;
$basePath = __DIR__ . '/../../../../';
chdir(__DIR__);
@Hounddog
Hounddog / debug_repositories
Created October 4, 2017 12:03
Iterate only when changed
"Repositories": {
"changed": true,
"msg": "All items completed",
"results": [
{
"_ansible_item_result": true,
"_ansible_no_log": false,
"_ansible_parsed": true,
"after": "2bebc339d977194c9029310a3f1f49dac2ea61ee",
"before": "2bebc339d977194c9029310a3f1f49dac2ea61ee",
@Hounddog
Hounddog / group_vars_services.yml
Created January 5, 2017 15:17
Ansible notify handler running multiple times
services:
default:
template: default
file_name: default.conf
cadvisor:
template: ssl
log: []
location:
- name: "/"
@Hounddog
Hounddog / HRVA9452
Last active November 15, 2016 13:14
crontabs: "test"
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
@Hounddog
Hounddog / hosts
Last active September 21, 2016 12:29
[development]
10.160.143.3
[production]
10.160.143.3
if(isset($postContent["body"])) {
$postContent["body"] = $this->sanitizeCSS($postContent["body"]);
}
switch( strtolower( $action )){
case 'publish':
try{
$post = $objXMLRPClientWordPress->uploadPost( $postContent );
$dossier->ExternalId = $post['postid'];