Skip to content

Instantly share code, notes, and snippets.

@s3u
s3u / gist:2898590
Created June 8, 2012 23:10
ql.io-compiler in the browser.
<script type="text/javascript" src="http://ql.io/scripts/compiler.js"></script>
<script type="text/javascript">
var plan = require('ql.io-compiler').compile('your ql.io script here');
</script>
@s3u
s3u / gist:2898580
Created June 8, 2012 23:08
Node.js snippet to generate the plan
var plan = require('ql.io-compiler').compile('your ql.io script here');
@s3u
s3u / index.html
Created June 8, 2012 20:55
Dot file generator for ql.io scripts.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script type="text/javascript" src="http://ql.io/scripts/jquery-min.js"></script>
<script type="text/javascript" src="http://ql.io/scripts/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ql.io/scripts/compiler.js"></script>
<script type="text/javascript" src="http://codemirror.net/lib/codemirror.js"></script>
<script type="text/javascript" src="http://ql.io/scripts/qlio-editor.js"></script>
@s3u
s3u / index.html
Created June 8, 2012 15:57
Visualize the execution plan for ql.io scripts
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
<script type="text/javascript" src="http://localhost:3000/scripts/jquery-min.js"></script>
<script type="text/javascript" src="http://localhost:3000/scripts/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ql.io/scripts/compiler.js"></script>
<script type="text/javascript" src="http://codemirror.net/lib/codemirror.js"></script>
var util = require('util'),
_ = require('underscore');
exports.filter = function() {
this.row = _.uniq(this.row);
return this.next(null, this.row);
}
/*
* Copyright 2012 eBay Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2012 eBay Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@s3u
s3u / gist:2783030
Created May 24, 2012 17:45
Example
Channel = [
{
"creationDate": "Tue May 22 2012 17:23:11 GMT+0530 (IST)",
"id": "2642",
"lcn": "17",
"logo": "627",
"name": "ETV Marathi",
"valid": "1"
},
{
yum groupinstall "Development Tools"
yum install expat-devel
yum install openssl openssl-devel
yum install expat expat-devel
# Download node
cd <node dir>
configure
make
sudo make install
var http = require('http');
var assert = require('assert');
var options = {
method: 'GET',
port: 3000,
host: '127.0.0.1',
path: '/'
};