Skip to content

Instantly share code, notes, and snippets.

@rjha
rjha / image-extraction.js
Created July 10, 2012 17:30
pinterest like image extraction and size determination
webgloo.imagep = new Image();
webgloo.imagep.onload = function() {
if(webgloo.sc.ImageSelector.debug){
console.log(this.src + " : " + this.width + "x" + this.height);
}
if((this.width >= 300) && (this.height >= 300 )) {
webgloo.sc.ImageSelector.addImage(this.src);
}
@rjha
rjha / sendgrid-wrapper
Created June 18, 2012 09:32
sendgrid web API wrapper in PHP
namespace com\indigloo\mail {
use com\indigloo\Util as Util ;
use com\indigloo\Configuration as Config ;
use com\indigloo\Logger as Logger ;
/**
* class to wrap sendgrid-php web API.
* sendgrid-php web API uses curl to communicate to sendgrid endpoint.
*