Skip to content

Instantly share code, notes, and snippets.

@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'];
'doctrine-hydrator' => array(
'product' => array(
'entity_class' => 'doctrine.entity',
'object_manager' => 'doctrine.entitymanager.orm_default',
'by_value' => true,
'hydrator' => 'Zend\\Stdlib\\Hydrator\\ArraySerializable',
'strategies' => array(
'category' => 'Application\Hydrator\EmbeddedEntityStrategy',
)
),
apiVersion: v1
kind: Service
metadata:
name: ci-jenkins
labels:
name: ci-jenkins
spec:
# if your cluster supports it, uncomment the following to automatically create
# an external load-balanced IP for the frontend service.
#type: LoadBalancer
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx-frontend
labels:
name: nginx-frontend
spec:
replicas: 1
selector:
name: nginx-frontend
@Hounddog
Hounddog / countrieslist.js
Created July 28, 2015 14:14
phonenumber formatting and paging for sitemap
angular.module('elephone.data.countriesList', []).value('countriesList', [
{lang: "it-IT", code: 'IT', name: 'ITALY', phoneCode: '+39', host: "elephone.it"},
{lang: "fr-FR", code: 'FR', name: 'FRANCE', phoneCode: '+33', host: "elephone.fr"},
{
lang: "nl-NL",
code: 'NL',
name: 'NETHERLANDS',
phoneCode: '+31',
host: "elephone.nl",
phoneNumberFormats: [