Skip to content

Instantly share code, notes, and snippets.

@ericabouaf
ericabouaf / Groovy_salesforce_example
Created December 20, 2010 17:28
A simple SOQL call from a Groovy script
import com.sforce.soap.enterprise.Connector
import com.sforce.soap.enterprise.DeleteResult
import com.sforce.soap.enterprise.EnterpriseConnection
import com.sforce.soap.enterprise.Error
import com.sforce.soap.enterprise.QueryResult
import com.sforce.soap.enterprise.SaveResult
import com.sforce.soap.enterprise.sobject.Account
import com.sforce.soap.enterprise.sobject.Contact
import com.sforce.ws.ConnectionException
import com.sforce.ws.ConnectorConfig
@ericabouaf
ericabouaf / yui_builder_textmate_command
Created January 16, 2011 10:42
Textmate command to build a YUI component using YUI Builder from Textmate
#!/bin/sh
# Textmate command to build a YUI component from Textmate
cd $TM_DIRECTORY
cd ..
echo "<pre style='font-size: 80%;'>"
ant all
echo "</pre>"
var myWidgetTop = myWidget.el.getBoundingClientRect().top;
CLICRDV.events.addListener(window, 'message', function (e) {
// Only handle messages comming from clicrdv.com domain
if (/https?:\/\/([a-z0-9\-]+\.)?clicrdv\.com/.test(e.origin)) {
window.scrollTo( 0, myWidgetTop );
}
});
function resolve_tinyurl($tinyurl) {
$ch = curl_init($tinyurl);
curl_setopt($ch,CURLOPT_HEADER,true);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,false);
$data = curl_exec($ch);
preg_match('#Location: ([^\n\r]*)#i', $data, $matches);
var AWS = require('aws-sdk');
var swf = new AWS.SWF();
exports.handler = function(event, context) {
console.log('Loop started !', JSON.stringify(event, null, 2) );
function callMySelfAndQuit() {
var lambda = new AWS.Lambda();
lambda.invoke({
@ericabouaf
ericabouaf / index.html
Created August 22, 2016 17:12
D3 hosting demo
<html>
<body>
Hello World !
</body>
</html>