Skip to content

Instantly share code, notes, and snippets.

┌───────────timestamp─┬─monetizationTimestamp─┬──────────────eventId─┬─monetizationValue─┬─externalPageViewId──────────────────────────────────────────────────────────────────────────────────────────────┐
│ 2022-07-03 22:10:26 │ 2022-07-03 22:10:25 │ 266482368722581329 │ 15851000 │ 1222551631502300416 │
│ 2022-07-03 22:10:30 │ 2022-07-03 22:10:28 │ 266482368722581329 │ 15851000 │ 1222551631502300416 │
│ 2022-07-04 00:53:24 │ 2022-07-04 00:53:21 │ 266482368722581329 │ 15851000 │ 1222551631502300416 │
│ 2022-07-04 06:56:25 │ 2022-07-04 06:56:19 │ 266482368722581329 │ 15851000 │ 1222551631502300416 │
@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)
@Slind14
Slind14 / script.js
Last active May 20, 2018 15:50
DS-GVO external image consent
/**
* Small vanilla js script which adds user consent for external images. Requires external image html tags to reference palceholder image, real url as extsrc arg and onclick call to loadImage(event) e.g.
* <img src="path/to/placeholder/img.png extsrc="external.com/path/to/external/image.jpg" onclick="loadImage(event);" />
* Have a nice day.
* Nils Lind aka Slind
*
* @license MIT
* @version 1.1
* @author Nils Lind aka Slind
* @updated 2018-05-20
// 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
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.ComponentMineshaftCorridor.func_74861_a(ComponentMineshaftCorridor.java:203)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.StructureMineshaftPieces.func_78817_b(SourceFile:63)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.StructureMineshaftPieces.func_78814_a(SourceFile:14)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.ComponentMineshaftCorridor.func_74861_a(ComponentMineshaftCorridor.java:166)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.StructureMineshaftPieces.func_78817_b(SourceFile:63)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.StructureMineshaftPieces.func_78814_a(SourceFile:14)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.ComponentMineshaftRoom.func_74861_a(SourceFile:146)
2014-07-26 15:34:11 [SEVERE] net.minecraft.world.gen.structure.StructureMineshaftStart.<init>(SourceFile:20)
2014-07-26 15:34:11 [SEVERE] net.minec
#!/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=''