Skip to content

Instantly share code, notes, and snippets.

View gladimdim's full-sized avatar
💭
Unreal Engine

Dmytro Gladkyi gladimdim

💭
Unreal Engine
View GitHub Profile
@gladimdim
gladimdim / gist:374138e8f9a199abb40d
Created January 6, 2016 13:07
Total lines sum calculator for bitbucket pull request
(function() {
var sumLines = (arr) => arr.reduce((prev,curr) => { return prev + Number.parseInt(curr.innerText)}, 0);
return {
'Pull request': $.find(".pull-request-title a")[0].text,
'Added': sumLines($.find(".lines-added")),
'Removed': sumLines($.find(".lines-removed"))
};
})();
async function initializeClient() {
const client = await ZoomdataSDK.createClient({
credentials: {
key: 'KhukSxkaka'
},
application: {
secure: false,
host: 'localhost',
port: 8080,
path: '/zoomdata'
const visualize = async () => {
const client = await initializeClient();
const query = await client.createQuery(
{name: "My IMPALA Source"},
{
groups: [
{
'name': 'state',
'limit': 50,
'sort': {
<html>
<head>
<title>Zoomdata Meta Service</title>
<!-- Needed to run built-in visualizations -->
<script src="./libs/jquery.min.js"></script>
<script src="http://developer.zoomdata.com/zoomdata-2.6/sdk/zoomdata-client.js"></script>
<script src="./app.js"></script>
</head>
</head>
<body>
async function initMetaThread() {
const client = await ZoomdataSDK.createClient({
credentials: {
key: '<your_key>'
},
application: {
secure: false,
host: 'localhost',
port: 8080,
path: '/zoomdata'
<html>
<head>
<title>Zoomdata Meta Service</title>
<script src="http://localhost:8080/zoomdata/sdk/zoomdata-client.js"></script>
<script src="./app.js"></script>
</head>
</head>
<body>
<div id="app">
async function initMetaThread() {
const client = await ZoomdataSDK.createClient({
credentials: {
key: '<your_key>'
},
application: {
secure: false,
host: 'localhost',
port: 8080,
path: '/zoomdata'
const initApp = async () => {
const visualization = await visualize();
visualization.query.validationErrors.subscribeOnNext((err) => {
console.log(err);
});
const rootDom = document.getElementById("controls");
const metaData = visualization.metaThread.getLatestResponse();
const aggrs = metaData.getAttrAggregations().filter((aggr) => {
return aggr.getType() === "TERMS";
});
const createControl = (aggrNames) => {
const rootElement = document.createElement("select");
rootElement.setAttribute("name", "aggregations");
for (let name of aggrNames) {
const optionElement = document.createElement("option");
optionElement.textContent = name;
rootElement.appendChild(
optionElement
);
}
async function initializeClient() {
const client = await ZoomdataSDK.createClient({
credentials: {
key: "KVKWiD8kUl"
},
application: {
secure: true,
host: "developer.zoomdata.com",
port: 443,
path: "/zoomdata-2.6"