Skip to content

Instantly share code, notes, and snippets.

View sgilligan's full-sized avatar

Simon Gilligan sgilligan

  • Demographic Mapping Online
  • Melbourne
View GitHub Profile
conn.queryAndCopy = async function(text) {
function copy(src) {
var dst = new ArrayBuffer(src.byteLength);
new Uint8Array(dst).set(new Uint8Array(src));
return dst;
}
const buffer = await this._bindings.runQuery(this._conn, text),
reader = Arrow.RecordBatchReader.from(buffer),
table = new Arrow.Table(reader);
{
"template": "logs-*",
"settings":
{
"number_of_shards": 1,
"number_of_replicas": 0,
"index":
{
"refresh_interval": "30s",
@sgilligan
sgilligan / esnextbin.md
Last active December 7, 2016 03:47
esnextbin sketch
@sgilligan
sgilligan / overlayExtend-3.htm
Created November 10, 2011 12:00
Extending Overlay Test Case 3
<!DOCTYPE html>
<html>
<head>
<title>Overlay Test</title>
<script type="text/javascript" src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<style type='text/css'>
body {margin:10px}
.yui3-widget {outline:none}
.yui3-widget-mask {background-color:black; opacity:.1}
.yui3-facebook {font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size:14px; background:none; border:10px solid rgba(0,0,0,0.445);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:0;}
@sgilligan
sgilligan / overlayExtend-2.htm
Created November 9, 2011 12:27
Extending Overlay Test Case 2
<!DOCTYPE html>
<html>
<head>
<title>Overlay Test</title>
<script type="text/javascript" src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<style type='text/css'>
body {margin:10px}
.yui3-widget {outline:none}
.yui3-widget-mask {background-color:black; opacity:.1}
.yui3-facebook {font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size:14px; background:none; border:10px solid rgba(0,0,0,0.445);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:0;}
@sgilligan
sgilligan / overlayExtend.htm
Created November 8, 2011 12:28
Extending Overlay Test Case
<!DOCTYPE html>
<html>
<head>
<title>Overlay Test</title>
<script type="text/javascript" src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<style type='text/css'>
body {margin:10px}
.yui3-overlay {outline:none}
.yui3-widget-mask {background-color:black; opacity:.1}
.yui3-facebook {font-family: "lucida grande",tahoma,verdana,arial,sans-serif; font-size:14px; background:none; border:10px solid rgba(0,0,0,0.445);-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;padding:0;}
@sgilligan
sgilligan / overlayDefect.htm
Created August 25, 2011 13:54
Centered overlay _syncPosUIAlign not centering correctly
<!DOCTYPE html>
<html>
<head>
<title>Widget Center test</title>
<style type="text/css">
.yui3-js-enabled .yui3-overlay-loading {top:-1000em; left:-1000em; position:absolute; }
.yui3-overlay-content {background-color:#ccc; border:1px solid #000; padding:5px; }
.yui3-overlay .yui3-widget-hd, .yui3-overlay .yui3-widget-bd, .yui3-overlay .yui3-widget-ft { background-color:#eee; padding:2px; border:1px solid #999;}
.yui3-overlay .yui3-widget-bd { background-color:#fff;}
</style>
@sgilligan
sgilligan / overlayDefect.htm
Created July 30, 2011 13:19
Overlay in 3.4PR3 throws Exception on show. Safari Only. 3.4PR2 ok.
<!DOCTYPE html>
<head>
<style type="text/css">
.yui3-overlay-content {padding:2px; border:1px solid #000; background-color:#aaa; font-size:93%;}
.yui3-overlay-content .yui3-widget-hd {font-weight:bold; text-align:center; padding:2px; border:2px solid #aa0000; background-color:#fff;}
.yui3-overlay-content .yui3-widget-bd {text-align:left; padding:2px; border:2px solid #0000aa; background-color:#fff;}
</style>
<script type="text/javascript" src="http://yui.yahooapis.com/3.4.0pr3/build/yui/yui-min.js"></script>
</head>
@sgilligan
sgilligan / Widget Animation Plugin
Created February 6, 2011 15:24
Trying to manually inject an animation method
<!DOCTYPE html>
<html>
<head>
<title>WidgetAnim test</title>
<style type="text/css">
.yui3-js-enabled .yui3-overlay-loading {top:-1000em; left:-1000em; position:absolute; }
.yui3-overlay-content {background-color:#ccc; border:1px solid #000; padding:5px; }
.yui3-overlay .yui3-widget-hd, .yui3-overlay .yui3-widget-bd, .yui3-overlay .yui3-widget-ft { background-color:#eee; padding:2px; border:1px solid #999;}
.yui3-overlay .yui3-widget-bd { background-color:#fff;}
</style>
@sgilligan
sgilligan / Overlay YUI Simple
Created December 2, 2010 04:31
Overlay that doesn't work in IE8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Overlay Extras via YUI</title>
<link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/3.2.0/build/cssfonts/fonts-min.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/3.2.0/build/simpleyui/simpleyui-min.js"></script>
<style type="text/css">