Skip to content

Instantly share code, notes, and snippets.

View venkatd's full-sized avatar

Venkat Dinavahi venkatd

View GitHub Profile
defmodule Neo.Query do
defstruct [
piped_queries: [],
optional_queries: [],
labels: [],
match_clauses: [],
merge_clauses: [],
where_clauses: [],
create_clauses: [],
defmodule Neo.QueryTest do
use ExUnit.Case
import Neo.Query
test "generates a simple match + return query" do
query = new_query
|> labels(yo: "yeah/man", dude: "nah")
|> return([:yo])
import React from 'react'
import {Editor as MobileDocEditor} from 'mobiledoc-kit';
const MOBILEDOC_VERSION = '0.3.0';
const EMPTY_MOBILEDOC = {
version: MOBILEDOC_VERSION,
markups: [],
atoms: [],
cards: [],
- turtle project
-- venkat's this week
---- task a
---- task b
-- vlad's this week
---- task q
---- task r
@venkatd
venkatd / test.html
Last active February 24, 2016 02:27
<!DOCTYPE html>
<html class='223792 no-js'>
<head>
<script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"4e6cb914c3","applicationID":"2869562","transactionName":"el9WQBMJWw1WER8UC0pESxsSDlgW","queueTime":1,"applicationTime":35,"agent":""}</script>
<script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o||e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({QJf3ax:[function(t,e){function n(){}function r(t){function e(t){return t&&t instanceof n?t:t?a(t,i,o):o()}function c(n,r,o){t&&t(n,r,o);for(var i=e(o),a=f(n),c=a.length,u=0;c>u;u++)a[u].apply(i,r);return i}function u(t,e){p[t]=f(t).concat(e)}function f(t){return p[t]||[]}function s(){return r(c)}var p={};return{on:u,emit:c,create:s,listeners:f,context
configByRole =
dsp:
sections: ['dashboard', 'exchange', 'xpublisher', 'campaign', 'ad']
reports:
dashboard:
type: "dashboard"
title: "Dashboard"
dimension: "account_name"
drill_down: "exchange"
exchange:
def apply_virtual_filters(operators)
# loop through operators (mix of virtual and real operators)
# if an operator is virtual, convert it to a real operator
# return new list of operators
end
FilterOperator = Struct.new(:type, :value)
def coerce_filters_to_operators(vals)
operators = build_filter_operators(vals)
class Tasks < Roda
route do |r|
r.on 'tasks' do
authenticate!
r.get do
# ...
end
r.get ':id' do
{
"nodes": [
{
"name": "localhost",
"root": ".",
"tasks": [
{
"name": "ad-server",
"root": ".",
"path": "build/x86_64/bin/adserver_runner",
@venkatd
venkatd / episode.js
Created August 26, 2015 21:00
Behavior for jumping to the right place when you click on a time
$(document.body).ready(function(){
window.addEventListener("hashchange", forwardAudioForHash, false);
$("#simplecast-audio-player").bind("jPlayer_loadstart", forwardAudioForHash)
$("#simplecast-audio-player").bind("jPlayer_waiting", showLoading)
$("#simplecast-audio-player").bind("jPlayer_playing", hideLoading)
$("#simplecast-audio-player").bind("jPlayer_pause", hideLoading)
$('.player a.jp-loading').click(function(){
$("#simplecast-audio-player").jPlayer("pause", seconds);
});