Skip to content

Instantly share code, notes, and snippets.


Justus Blümer justusbluemer

View GitHub Profile
justusbluemer / gist:91629adc9ceca3323e983b7043b042eb
Created Nov 27, 2018
Link tracking example without data- attributes
View gist:91629adc9ceca3323e983b7043b042eb
<a href="/example" id="link-123">Anchor text</a>
var linkTrackingData = [
id: 'link-123',
dyn_eventaction: '…',
dyn_teasertype: '…',
moduletype: '…',
elementinfo: '…',
View pager.js
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import classNames from 'classnames'
import styles from './Pager.styl'
import queryBuilder from './queryBuilder'
const Page = ({ page, currentPage, onClick }) => {
const diff = Math.abs(page.number - currentPage)
const className = classNames({
justusbluemer /
Last active Jul 16, 2019
How to reset the CouchDB admin password on macOS

If you want to reset the admin password of your CouchDB database, you just have to edit your configuration file at


and remove the lines immediately after "[admins]". Then, restart CouchDB. Please make sure to create a new admin user for security.

Thanks to Alex Burghardt for his hint at

justusbluemer / loadJSONFiles.js
Created Dec 2, 2019
Loads files from a directory and parses them as JSON
View loadJSONFiles.js
const fs = require("fs")
;(async function() {
let items = await loadJSONFiles("items/")
* Loads and parses JSON files from the specified directory
* @param {string} dirname The name of the directory
View setCookie.js
function() {
var setCookie = function (cookieName, cookieValue, expirationInMinutes, domain) {
var expirationTime = expirationInMinutes * 60 * 1000;
var date = new Date();
var dateTimeNow = date.getTime();
date.setTime(dateTimeNow + expirationTime);
var expirationTime = date.toUTCString();
document.cookie = cookieName+"="+cookieValue+"; expires="+expirationTime+"; path=/; domain="+domain;
justusbluemer / adcell.js
Created Feb 2, 2021
ADCELL conversion tracking code
View adcell.js
<script type="text/javascript" src=""></script>
<script type="text/javascript">
'pid' : '0000',
'eventid' : '0000',
'referenz' : 'ABC_123',
'betrag' : '123.45'