Skip to content

Instantly share code, notes, and snippets.

View Raphael-foreign-object.html
<!DOCTYPE html>
<html xmlns="">
<script src="" type="text/javascript" charset="utf-8"></script>
window.onload = function() {
// Inserting foreignObject into the markup svg
var g = document.getElementById("g");
View index.html
Hello World !
View recursive-lambda-wreaking-havoc
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();
View fix-scrolltop
var myWidgetTop = myWidget.el.getBoundingClientRect().top;, 'message', function (e) {
// Only handle messages comming from domain
if (/https?:\/\/([a-z0-9\-]+\.)?clicrdv\.com/.test(e.origin)) {
window.scrollTo( 0, myWidgetTop );
ericabouaf / yui_builder_textmate_command
Created Jan 16, 2011
Textmate command to build a YUI component using YUI Builder from Textmate
View yui_builder_textmate_command
# Textmate command to build a YUI component from Textmate
cd ..
echo "<pre style='font-size: 80%;'>"
ant all
echo "</pre>"
ericabouaf / Groovy_salesforce_example
Created Dec 20, 2010
A simple SOQL call from a Groovy script
View Groovy_salesforce_example
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
ericabouaf / rforce_query_example.rb
Created Nov 18, 2010
Example on how to use the RForce gem with Salesforce SOQL queries
View rforce_query_example.rb
require 'rubygems'
require 'rforce'
require 'base64'
# Install:
# sudo gem install rforce
# sudo gem install facets -v 2.4
# Important: rforce 0.4.1 is not compatible with facets 2.9 !
ericabouaf / gmail2prowl.rb
Created Nov 17, 2010
Check a Gmail account for move notifications from Dragon Go Server (DGS) and sends a Prowl notification to my iPhone
View gmail2prowl.rb
require 'rubygems'
require 'gmail'
require 'prowl'
gmail ='eric.****', '****')
emails = gmail.inbox.emails(:unread, :from => "")
if emails.size > 0
email = emails.first
View setup github project
git init
git add *
git commit -m 'first commit'
git remote add origin$1.git
git push origin master
# Create the gh-pages branch to serve the files from GitHub
git branch gh-pages
View exhibit-importers.js
* Set up the inline importer
Exhibit.InlineImporter = { };
= Exhibit.InlineImporter;
= function(data, database, cont) {