Skip to content

Instantly share code, notes, and snippets.

@Brontojoris
Brontojoris / adobe_mobile_sdk_pretty_print.js
Last active June 19, 2024 05:52
Pretty print Adobe Analytics Mobile SDK beacons in the Proxyman Form tab.
/* This ProxyMan script tidies up the display of
Adobe Analyics beacons in the Form preview tab.
Its very possible these hits will not be valid
and not be processed correctly by the data collection server.
*/
function onRequest(context, url, request) {
var shortenProductStrings = false,
deleteNoise = true,
visualSeperators = false,
visualSeperators2 = true,
@Brontojoris
Brontojoris / tampermonkey-utils.js
Created June 17, 2022 03:17
Tampermonkey utls
(() => {
"use strict";
const Event = class {
constructor(script, target) {
this.script = script;
this.target = target;
this._cancel = false;
this._replace = null;
@Brontojoris
Brontojoris / Adobe Analytics for Proxyman.js
Last active June 19, 2024 02:31
ProxyMan Script for Adobe Analytics
/* This ProxyMan script finds the PageName and ActionName fields
from an Adobe Analytics Beacon and adds it to a custom header
so it's visable in the request list.
*/
function onRequest(context, url, request) {
var reportSuite, reportMethod, pageName, customLink, osVersion, platform, appId, contentIcon = "",
activeStore, browseSortMethod, searchContext, searchId, searchSessionId, searchTypedKeyword, trolleyContext,
trolleyOrderId, products, productListItems, jsonData,
req = request,
convertToJSON = function(content) {
@Brontojoris
Brontojoris / contentTypeIcon.js
Last active December 14, 2021 04:01
Proxyman - Set a Content Type icon
function onRequest(context, url, request) {
request.headers["Page"] = request.path;
return request;
}
function onResponse(context, url, request, response) {
if(response.statusCode !== 200){return response}
var contentIcon = "",
contentType = response.headers["Content-Type"];
@Brontojoris
Brontojoris / IntelliJ Coda Salad-color-theme.json
Created March 16, 2021 23:28
My preferred colour theme for VS Code
{
"name": "IntelliJ Coda Salad",
"colors": {
"activityBar.background": "#f2f2f2",
"activityBar.border": "#bcbcbc",
"activityBar.foreground": "#000000",
"breadcrumb.background":"#F3F3F3",
"breadcrumb.border":"#C0C0C0",
"editor.background": "#ffffff",
"editor.findMatchBorder": "#ffffff00",
@Brontojoris
Brontojoris / .editorconfig
Created August 12, 2020 05:52
Editor Configuration File
# http://editorconfig.org
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@Brontojoris
Brontojoris / smelly-domains.txt
Created June 23, 2020 07:56
Personal Blocklist
allin1vacations.com
aluxurycars.com
amazingassistedliving.com
anonext.com
anwswatch.com
apersonalattorneys.com
areputationmanagement.com
arthritiscancer.com
astromenda.com
attractivemortgageoffers.com
#EXTM3U x-tvg-url="http://i.mjh.nz/au/Melbourne/epg.xml.gz"
#EXTINF:-1 tvg-id="tv.101406030635" tvg-logo="http://i.mjh.nz/au/images/tv.101406030635.png",TEN
https://network10sec-live-me.akamaized.net/hls/live/735555/10VIC/stream.m3u8
#EXTINF:-1 tvg-id="tv.101406030638" tvg-logo="http://i.mjh.nz/au/images/tv.101406030638.png",10 Peach
https://pubads.g.doubleclick.net/ssai/event/QTtJ0VGKQuC1U36Qv06bRg/master.m3u8
#EXTINF:-1 tvg-id="tv.101406030631" tvg-logo="http://i.mjh.nz/au/images/tv.101406030631.png",10 Bold
https://network10sec-live-me.akamaized.net/hls/live/735549/10BoldVIC/stream.m3u8
@Brontojoris
Brontojoris / IntelliJ Coda Salad.tmTheme
Created February 16, 2020 23:56
Intellij and Coda light themes for textmate compatible editors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>Creator: CodeRunner</string>
<key>name</key>
<string>IntelliJ Coda Salad</string>
<key>settings</key>
<array>
@Brontojoris
Brontojoris / digitalData bookmarklet.js
Created February 11, 2020 01:21
Bookmarklet to print a JSON object to the browser console.
javascript:var jso=prompt("Enter JS Object","digitalData");function JSONstringify(json) {if (typeof json != 'string') {json = JSON.stringify(json, undefined, '\t');}var arr = [],_string = 'color:green',_number = 'color:darkorange',_boolean = 'color:blue',_null = 'color:magenta',_key = 'color:red';json = json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {var style = _number;if (/^"/.test(match)) {if (/:$/.test(match)) {style = _key;} else {style = _string;}} else if (/true|false/.test(match)) {style = _boolean;} else if (/null/.test(match)) {style = _null;}arr.push(style);arr.push('');return '%c' + match + '%c';});arr.unshift(json);console.log.apply(console, arr);};JSONstringify(window[jso]);void(0);