Skip to content

Instantly share code, notes, and snippets.

John D'Emic johndemic

Block or report user

Report or block johndemic

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
View gist:5c1eabd77de91a0180b3
org.mule.api.config.ConfigurationException: Line 15 in XML document from URL [file:/Users/john.demic/AnypointStudio/db-batch-messaging/jms-batch-messaging-connector/target/test-classes/jms-batch-messaging-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 19; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jms-batch-messaging:config-type'. One of '{"":annotations, "":description, "":beans, "":bean, "":property-placeholder, "":ref, "":global-property, "":configuration, "":notifications, "":abstract-extension, "http://www.mules

Keybase proof

I hereby claim:

  • I am johndemic on github.
  • I am johndemic ( on keybase.
  • I have a public key whose fingerprint is 1393 7573 A9F1 9E89 D4B0 EEF3 07BE 3A45 D0DA 31FE

To claim this, I am signing this object:

johndemic / cassandra-idempotent-config.xml
Created Sep 24, 2013
An example of using the CassandraDbObjectStore to distribute the state of an idempotent-message-filter.
View cassandra-idempotent-config.xml
<spring:bean id="cassandraObjectStore" class="com.mulesoft.mule.cassandradb.CassandraDBObjectStore"
<spring:property name="host" value=""/>
<spring:property name="port" value="9160"/>
<spring:property name="keyspace" value="MuleState"/>
<spring:property name="consistencyLevel" value="ALL"/>
<spring:property name="defaultPartitionName"
value="idempotentFlow_#[new java.text.SimpleDateFormat('yyyy_MM_dd').format(new Date())]"/>
public static void installLicense() throws Exception {
LicenseManager licenseManager = LicenseManagementFactory.getInstance()
MuleLicenseKey license = new MuleLicenseKey();
* $Id: 24377 2012-05-21 12:35:37Z pablo.kraan $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved.
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
View gist:4532336
* Execute a JPA query. If the payload of the message is a <code>List</code> or <code>Map</code> then its used
* as the query parameters. If neither statement nor namedQuery are set then the payload of the message is assumed
* to be a <code>CriteriaQuery</code> instance.
* <p/>
* {@sample.xml ../../../doc/JPAModule-connector.xml.sample jpa:query}
* @param statement a JPA QL statement to execute
* @param namedQuery a named query to execute
* @param queryParameters the query parameters
View gist:3925465
- (IBAction)storePassword:(id)sender
NSString *service = [NSString stringWithFormat:@"%@@%@", [username stringValue], [address stringValue]];
if ([SSKeychain passwordForService:service account:@"KH"] != nil) {
NSError *error = nil;
if ([SSKeychain deletePasswordForService:service account:@"KH" error:&error] == NO) {
NSLog(@"Could not delete existing password");
johndemic / gist:3916048
Created Oct 19, 2012
View gist:3916048
StockQuoteRequest stockQuoteRequest = new StockQuoteRequest();
stockQuoteRequest.setStartDate(new Date( new Date().getTime() - (86400000 * 7)));
stockQuoteRequest.setEndDate(new Date());
ZMQ.Socket zmqSocket = zmqContext.socket(ZMQ.REQ);
zmqSocket.send(stockQuoteRequest.toProtocolBufferAsBytes(), 0);
View gist:3916027
<flow name="main">
<zeromq:inbound-endpoint address="tcp://*:9090" socket-operation="bind"
<component class="com.acmesoft.stock.service.StockDataServiceImpl"/>
expression="return com.acmesoft.stock.model.StockQuote.toProtocolBuffer(payload)"/>
johndemic / gist:3916021
Created Oct 19, 2012
pom.xml with zeromq dependency
View gist:3916021
You can’t perform that action at this time.