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)
@prokopsimek
prokopsimek / portainer.yml
Last active December 20, 2022 16:18
docker stack setup swarmpit & portainer
version: '3'
services:
agent:
image: portainer/agent
environment:
# REQUIRED: Should be equal to the service name prefixed by "tasks." when
# deployed inside an overlay network
AGENT_CLUSTER_ADDR: tasks.agent
# AGENT_PORT: 9001
// 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();