Skip to content

Instantly share code, notes, and snippets.

@Slind14
Slind14 / nested.sql
Created September 14, 2018 08:02 — forked from alexey-milovidov/nested.txt
Example of Nested data type in ClickHouse.
:) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192)
CREATE TABLE test.nested
(
EventDate Date,
UserID UInt64,
Attrs Nested(
Key String,
Value String)
) ENGINE = MergeTree(EventDate, UserID, 8192)
// Store ad tags in localStorage to enable reporting bad ads
// TODO: This doesn't work if multiple ads are shown in one placement with googletag.pubads().refresh()
googletag.pubads().addEventListener('slotRenderEnded', function (event) {
if (typeof(localStorage) !== 'object') console.log('fail');
if (event.slot.getResponseInformation() === null) return;
var slotAdUnitPath = event.slot.getAdUnitPath();
gpt_placements[slotAdUnitPath] = {};
gpt_placements[slotAdUnitPath]['dfp'] = event.slot.getResponseInformation();
gpt_placements[slotAdUnitPath]['dfp']['contentUrl'] = event.slot.getContentUrl();
#!/bin/bash
#
# Author: Sameer Naik <sameer@damagehead.com>
# Gist: https://gist.github.com/sameersbn/dd24dfdd13bc472d11a5
# Short Url (raw): http://goo.gl/iJcvCP
#
# Installs a bunch of plugins for the docker-redmine image
#
# Usage:
# $ mkdir -p /opt/redmine/data/plugins
#!/bin/bash
#
# Author: Sameer Naik <sameer@damagehead.com>
# Gist: https://gist.github.com/sameersbn/aaa1b7bb064703c1e23c
# Short Url (raw): http://goo.gl/deKDpp
#
# Installs a bunch of themes for the docker-redmine image
#
# Usage:
# $ mkdir -p /opt/redmine/data/themes
#!/bin/bash
FORGE_VERSION='9.11.1.965'
MC_VERSION='1.6.4'
SERVER_ID='example'
SERVER_NAME='Example Server'
SERVER_REVISION=`date +%Y%m%d.%H%M`
SERVER_ADDRESS=''
ICON_URL=''
#!/bin/bash
FORGE_VERSION='9.11.1.965'
MC_VERSION='1.6.4'
SERVER_ID='example'
SERVER_NAME='Example Server'
SERVER_REVISION=`date +%Y%m%d.%H%M`
SERVER_ADDRESS=''
ICON_URL=''