Skip to content

Instantly share code, notes, and snippets.

View ryx's full-sized avatar
🕶️
Learn, code, share

Rico Pfaus ryx

🕶️
Learn, code, share
View GitHub Profile
@ryx
ryx / adobeAnalyticsDebugger.js
Last active May 28, 2019 15:24
A tiny Adobe Analytics debugging helper to be used as bookmarklet
/**
* A tiny Adobe Analytics debugging helper to be used as bookmarklet. Compared to
* Adobe's own debugging helper this one simply dumps JSON objects to the console,
* which I personally prefer over fancy HTML tables. This one also supports POST
* requests as sometimes used by s.t and s.tl which is quite useful if you need to
* debug asynchronous tracking requests.
*/
(function () {
// create a nice JSON representation of a query string
function jsonifyRequestUrl(url) {
@ryx
ryx / verticalRhythmHelper.js
Last active October 8, 2022 00:47
Vertical Rhythm Guides and Helper Bookmarklet
/**
* Tiny helper that adds horizontal guidelines over the complete website.
* It can be used to validate the "vertical rhythm" in the current document.
*
* Use UP/DOWN keys to adjust height when cursor is inside text input.
*/
(function (d) {
var ROW_HEIGHT = 24;
function resetGrid(rowHeight) {
@ryx
ryx / namegenerator.js
Last active January 21, 2019 10:53
Random (German) Name Generator
/**
* Creates "contemporary" german (mainly female) names, with a little bit of fun added ;)
*
* Examples:
* Gerna-Bertomine Braunlens
* Brunlamunde Ringer-Rot
* Joladane zu Paffeneier
* Jora Wollenlens-Schiss
* Lata Krachling
* Klonlaela Grün-Eichelhorst
@ryx
ryx / pushStateCustomEvent.js
Last active August 19, 2023 14:12
Wrap window.history to create custom pushState event dispatched from window
// wrap history object (call only once!)
(function (history) {
const funcs = [];
// wrap pushState to send custom event
const pushState = history.pushState;
history.pushState = function (state, unused, href) {
window.dispatchEvent(
new CustomEvent('pushState', { detail: { state, href } })
);