Skip to content

Instantly share code, notes, and snippets.

View ulrich's full-sized avatar
🏠
Working from home

Ulrich VACHON ulrich

🏠
Working from home
View GitHub Profile
@ulrich
ulrich / test_navigation_google.js
Created April 7, 2013 16:28
This Gist is a dummy CasperJS test with the grails-casper-plugin configuration .
var casper = require('casper').create();
casper.start('http://www.google.fr/', function () {
this.test.assertTitle('Google', 'google homepage title is the one expected');
this.test.assertExists('form[action="/search"]', 'main form is found');
this.fill('form[action="/search"]', {
q: 'foo'
}, true);
});
/*
Java 0day 1.7.0_10 decrypted source
Originaly placed on https://damagelab.org/index.php?showtopic=23719&st=0
From Russia with love.
*/
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.security.AccessController;
@ulrich
ulrich / gist:3737910
Created September 17, 2012 15:08
This script tests a simple emberjs application with casperjs.
var casper = require('casper').create({
verbose: true,
logLevel: 'debug',
});
var url = "file:///media/data/projects/personnal/js/ember.js/simple/index.html";
// a callback that ensures the runloop is flushed before an assert is run. Based on gist...
/*casper.test.emberDidRender = function(cbk){
@ulrich
ulrich / gist:648908
Created October 27, 2010 12:07
HTML5 canvas example with Sierpiński
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>canvas hello world</title>
<style>
canvas {
margin: 0 auto;
display: block;
padding: 1px;