Skip to content

Instantly share code, notes, and snippets.

@havana59er
havana59er / rhino suitejs
Created November 21, 2011 01:23 — forked from jzaefferer/rhino suitejs
QUnit-CLI with both Rhino and Node.js;
if (typeof require != "undefined") {
// should change export to module.exports = QUnit
QUnit = require("../qunit/qunit.js").QUnit;
print = console.log;
} else {
load("../qunit/qunit.js");
}
var stop_watch = {
@havana59er
havana59er / SP2010_create_list_item.html
Created March 28, 2012 18:11
Create a new list item in SharePoint 2010 using javascript
<div>
<label for="myAnnouncement">Announcement</label>
<input id="myAnnouncement" type="text" /><br />
<input type="button" value="Post Announcement" />
</div>
<script type="text/javascript" >
// Use this to delay execution until the file sp.js has loaded. Also a good way to keep your context free of globals.
ExecuteOrDelayUntilScriptLoaded(function() {
// get announcement text
@havana59er
havana59er / SfToDomTransformer.java
Created September 17, 2012 20:29
Mule - SFDC Transformer - Convert SalesForce query result to dom4j XML Document
package org.asm.mule;
import java.util.List;
import java.util.Map;
import org.dom4j.Branch;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.mule.api.transformer.TransformerException;
@havana59er
havana59er / RoutingSlip.xml
Created September 18, 2012 21:54
Mule - Enterprise Integration Pattern - Routing Slip
<?xml version="1.0" encoding="UTF-8"?>
<mule version="EE-3.3.1"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
@havana59er
havana59er / gist:4675063
Created January 30, 2013 17:44
How to get Custom List Values from NetSuite Web Services. This example uses CXF.
NetSuiteService service = new NetSuiteService();
NetSuitePortType proxy = service.getNetSuitePort();
proxy.login(loginRequest);
RecordRef recordRef = new RecordRef();
recordRef.setInternalId(CUSTOM_LIST_INTERNAL_ID);
recordRef.setType(RecordType.CUSTOM_LIST);
GetRequest request = new GetRequest();
request.setBaseRef(recordRef);