Skip to content

Instantly share code, notes, and snippets.

Dan Diephouse dandiep

Block or report user

Report or block dandiep

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:3231416
<objectstore:config name="Objectstore" partition="default" doc:name="Objectstore"/>
<flow name="PollForNewInvoices">
<poll frequency="10000">
<!-- Get the last invoice synced -->
<objectstore:retrieve config-ref="Objectstore" key="lastInvoiceId" defaultValue-ref="#[-1]" doc:name="Get Last Invoice ID"/>
</poll>
<!-- search for invoices with an ID greater than lastInvoiceId -->
<flow-ref name="GetUpdatedInvoices"/>
<!-- Update the last invoice synced -->
View consumer.xml
<flow name="consumer">
<sqs:receive-messages />
<mongo:insert-object-from-map collection="some_collection">
<mongo:element-attributes>
<mongo:element-attribute key="text">#[payload]</mongo:element-attribute>
</mongo:element-attributes>
</mongo:insert-object-from-map>
</flow>
@dandiep
dandiep / httptosqs.xml
Created Dec 13, 2011
HTTP POST to SQS
View httptosqs.xml
<flow name="producer">
<inbound-endpoint address="http://localhost:9090/queue"/>
<sqs:send-message/>
</flow>
@dandiep
dandiep / gist:1179287
Created Aug 29, 2011
test jar for maven
View gist:1179287
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
View gist:1179281
<dependencies>
<dependency>
<groupId>com.mulesoft.ion</groupId>
<artifactId>ion-web</artifactId>
<version>${project.version}</version>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.ion</groupId>
<artifactId>ion-web</artifactId>
@dandiep
dandiep / gist:1179274
Created Aug 29, 2011
Browser test pom
View gist:1179274
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
@dandiep
dandiep / gist:1179263
Created Aug 29, 2011
Selenium Configuration
View gist:1179263
<profiles>
<profile>
<id>saucelabs</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
@dandiep
dandiep / gist:1179254
Created Aug 29, 2011
Create Selenium Driver
View gist:1179254
@Before
public void createDriver() throws MalformedURLException {
String remoteTest = System.getProperty("selenium.remote");
if ("true".equals(remoteTest)) {
String browser = System.getProperty("selenium.browser", "firefox");
String version = System.getProperty("selenium.browser.version", "");
Platform platform = Platform.valueOf(System.getProperty("selenium.platform", "ANY"));
DesiredCapabilities capabilities = new DesiredCapabilities(browser, version, platform);
capabilities.setCapability("max-duration", "120"); // tests can't run more than 2 mins
@dandiep
dandiep / gist:1094148
Created Jul 20, 2011
MQL Version data
View gist:1094148
from payload as u
select new(com.mulesoft.mql.example.User) {
name = u.name,
email = u.email,
address = new(com.mulesoft.mql.example.Address) {
address = u.address,
city = u.city,
state = u.state
}
}
View gist:1094105
<mql:transform query="from yammer.messages select new { text = body.plain }" />
<mql:transform query="from twitter.publicTimeline as tweet select new { text = tweet.text }" />
You can’t perform that action at this time.