Skip to content

Instantly share code, notes, and snippets.

View ebrehault's full-sized avatar

Eric BREHAULT ebrehault

View GitHub Profile
{
"games": [
{
"url": "https://api.github.com/gists/5061965",
"id": "5061965",
"white": "Riveen",
"black": "mephux",
"result": "0-1"
}
]
@ebrehault
ebrehault / gist:6027283
Created July 18, 2013 07:09
plomino db sample to index docs in portal catalog's Subject index
<plominodatabase id="test-subjects">
<design>
<dbsettings version="1.16">
<AboutDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></AboutDescription>
<UsingDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></UsingDescription>
<IndexAttachments type="Products.Archetypes.Field.BooleanField">False</IndexAttachments>
<FulltextIndex type="Products.Archetypes.Field.BooleanField">True</FulltextIndex>
<IndexInPortal type="Products.Archetypes.Field.BooleanField">True</IndexInPortal>
<debugMode type="Products.Archetypes.Field.BooleanField">False</debugMode>
<CountDocuments type="Products.Archetypes.Field.BooleanField">False</CountDocuments>
//==============================================================================
// Casper generated Mon Jun 10 2013 10:09:49 GMT+0200 (CEST)
//==============================================================================
var x = require('casper').selectXPath;
var casper = require('casper').create();
casper.options.viewportSize = {width: 1615, height: 928};
casper.start('http://wetter.orf.at/oes/');
casper.waitForSelector(".mapNavigation li:nth-child(2) div",
function success() {
db = context.getParentDatabase()
file_path = db.getDocument("annonces_path").configValues.encode('ascii')
photos_path = db.getDocument("photos_path").configValues.encode('ascii')
annonces_file = open_url("file://"+file_path, asFile=True)
csv_data = csv_to_array(annonces_file, delimiter="#")
csv_data = csv_data[1:]
mapping_main = {
'annonce_reference': 0,
'annonce_type': 1,
@ebrehault
ebrehault / gist:4976059
Created February 18, 2013 09:03
phantomjs svg rendering
var page = require('webpage').create();
page.open('http://raphaeljs.com/github/dots.html', function () {
page.render('screen2.png');
phantom.exit();
});
@ebrehault
ebrehault / gist:4961393
Created February 15, 2013 16:13
Casperjs issues with SVG
//==============================================================================
// Casper generated Fri Feb 15 2013 14:10:44 GMT+0100 (CET)
//==============================================================================
var x = require('casper').selectXPath;
var casper = require('casper').create();
casper.options.viewportSize = {width: 1615, height: 964};
// THIS ONE PRODUCES A BAD SCREENSHOT:
casper.start('http://raphaeljs.com/pie.html');
@ebrehault
ebrehault / gist:4954392
Created February 14, 2013 17:17
casper drag&drop not working with leaflet
//==============================================================================
// Casper generated Thu Feb 14 2013 18:15:16 GMT+0100 (CET)
//==============================================================================
var x = require('casper').selectXPath;
var casper = require('casper').create();
casper.options.viewportSize = {width: 1615, height: 964};
casper.start('http://leafletjs.com/');
casper.then(function() {