Skip to content

Instantly share code, notes, and snippets.

View chamerling's full-sized avatar
🤟

Christophe Hamerling chamerling

🤟
View GitHub Profile
@chamerling
chamerling / runGruntfile.js
Created February 25, 2014 09:04
Get live stdout on grunt-run-grunt
var path = require('path');
var conf = require('./lib');
var parsers = require('./parsers');
// write shell scripts
function writeShell(grunt, options, src, cwd, argArr) {
var dir = options.writeShell;
if (grunt.file.isFile(options.writeShell)) {
dir = path.dirname(options.writeShell);
}
var client = new xmpp.Client({
jid: 'user@example.com',
password: 'password'
});
client.on('connection', function() {
console.log('online')
});
client.on('stanza', function(stanza) {
@chamerling
chamerling / index.js
Created June 6, 2014 16:20
easyrtc custom server events
'use strict';
var easyrtc = require('easyrtc');
var config = require('../core').config('default');
var server = {
started: false,
pub: null
};
exports = module.exports = server;
# Test
@chamerling
chamerling / index.js
Created May 7, 2015 15:04
Express App with statsd middleware
'use strict';
var express = require('express');
var statsd = require('express-statsd');
var app = express();
app.use(statsd({host: 'statsd', port: 8125}));
app.get('/', function (req, res) {
res.json(200, {yo: 'lo'});
@chamerling
chamerling / Dockerfile
Created May 7, 2015 15:05
Docker file for Express App
# Build
# docker build -t chamerling/lazyguy-monitoring .
FROM node:0.10.36
MAINTAINER Christophe Hamerling <chamerling@linagora.com>
# Cache NPM install of package.json has not been changed
# cf http://www.clock.co.uk/blog/a-guide-on-how-to-cache-npm-install-with-docker
ADD package.json /src/package.json
@chamerling
chamerling / docker-compose.yml
Last active August 29, 2015 14:20
Docker Compose for Express Monitoring witj statsd and grafana
app:
build: .
links:
- statsd:statsd
ports:
- "3000:3000"
statsd:
image: hopsoft/graphite-statsd
ports:
- "3002:80"
@chamerling
chamerling / gist:1151188
Created August 17, 2011 09:31
Notification Snippet
/** PETALS - PETALS Services Platform.
* Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
/**
*
*/
package org.petalslink.dsb.notification.service;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
import org.petalslink.dsb.soap.AbstractService;
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="WSN" resourceRoot="" soapui-version="3.6.1" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="NotificationProducerServiceSoapBinding" type="wsdl" bindingName="{http://docs.oasis-open.org/wsn/bw-2}NotificationProducerServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="http://localhost:7600/petals/ws/NotificationProducer?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:7600/petals/ws/NotificationProducer?wsdl"><con:part><con:url>http://localhost:7600/petals/ws/NotificationProducer?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="NotificationProducerService" targetNamespace="http://docs.oasis-open.org/wsn/bw-2" xmlns:ns1="http://docs.oasis-open.org/wsn/b-2" xmlns:ns2="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns3="http://schemas.xmlsoap.org/soap/http" xmlns