Skip to content

Instantly share code, notes, and snippets.

$ curl --data-binary "capitalize this" http://localhost:8080/services/capitalizer
Capitalize This
$ curl --data-binary "capitalize this" http://localhost:8080/capitalizer
Capitalize This
@rossmason
rossmason / gist:1303266
Created October 21, 2011 06:59
encrypt gist
$ export MULE_ENCRYPTION_PASSWORD=MyEncryptionPassword
@rossmason
rossmason / gist:1303264
Created October 21, 2011 06:57
jasypt encrypt
$ ./encrypt.sh input="dbpassword" password=MyEncryptionPassword algorithm=PBEWithMD5AndDES
@rossmason
rossmason / gist:1297649
Created October 19, 2011 07:06 — forked from ddossot/gist:1260603
Mule Redis DS Ops
<!-- Store the current message payload under my_key
with the provided TTL -->
<redis:set key="my_key" expire="3600" />
<!-- Retrieve the value -->
<redis:get key="my_key" />
<!-- Specific data structures are supported -->
<redis:hash-set key="my_key" field="my_field" />
@rossmason
rossmason / gist:1297643
Created October 19, 2011 07:02 — forked from ddossot/gist:1260622
Mule Redis PubSub
<!-- Publish the current message's payload
to the news.art.figurative channel -->
<redis:publish channel="news.art.figurative" />
<!-- Subscribe to art channels, and some good sport too :) -->
<redis:subscribe>
<redis:channels>
<redis:channel>news.art.*</redis:channel>
<redis:channel>news.sport.rugby</redis:channel>
</redis:channels>
<!-- configure the cloud connectors -->
<sfdc:config name="mySF" username="${sf.user}" password="${sf.password}" securityToken="${sf.securityToken}"/>
<twilio:config name="myTwilio" accountSid="${twilio.sid}" authToken="${twilio.authToken}"/>
<flow name="sendSmsNotifications">
<sfdc:subscribe-topic config-ref="mySF" topic="/SMSNotificationStream"/>
<regex-filter pattern="\#now"/>
<mule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:magento="http://www.mulesoft.org/schema/mule/magento"
xmlns:mongodb="http://www.mulesoft.org/schema/mule/mongodb"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/magento http://www.mulesoft.org/schema/mule/magento/1.2/mule-magento.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
http://www.mulesoft.org/schema/mule/mongodb http://www.mulesoft.org/schema/mule/mongodb/3.1/mule-mongodb.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.0/mule-http.xsd">
<flow name="helloFlow">
<inbound-endpoint address="http://localhost:63081/hello"/>
<cxf:jaxws-service serviceClass="org.example.HelloServiceImpl"/>
<component>
<singleton-object class="org.example.HelloServiceImpl" />
</component>
</flow>
<service name="helloService">
<inbound>
<inbound-endpoint address="cxf:http://localhost:63081/hello" synchronous="true"/>
</inbound>
<component>
<singleton-object class="org.example.HelloServiceImpl" />
</component>
</service>