Skip to content

Instantly share code, notes, and snippets.

View FikretHassan's full-sized avatar

Fikret Hassan FikretHassan

View GitHub Profile
@FikretHassan
FikretHassan / report-heavy-ad-intervention.js
Last active June 20, 2024 13:02
Add this to your creative / creative wrapper to log chrome heavy ad interventions to the console
const observer = new ReportingObserver(
(reports, observer) => {
console.log('ADTECH: reporting observer results:', JSON.stringify(reports));
}, {
buffered: true
}
);
// start watching for interventions
observer.observe();
@FikretHassan
FikretHassan / report-ads-to-slack.js
Last active May 6, 2024 12:32
report-ads-to-slack.js
/*
This is outdated, for the up to date version see:
https://github.com/FikretHassan/report-ads-to-slack-chrome-extension/blob/main/Ad%20Feedback%20Toggle%20Extension/adtech.js
*/
window.top.googletag.cmd.push(function() {
window.top.adentify = window.top.adentify || {};
window.top.adentify.about = { // deatils about this version of the code
version: '0.1',
@FikretHassan
FikretHassan / pubsub.gd
Last active March 14, 2025 23:52
GDScript Pubsub Singleton Example
extends Node
var topics = {} # Stores event subscribers { name, token, callback, unsubscribeOnExecute }
var published_topics = [] # Ordered list of published topics
var execution_counts = {} # Tracks how many times each topic's subscribers have run
var next_token = 1 # Auto-incrementing ID for subscription tokens
# Subscribe to an event with a unique token and optional auto-unsubscribe
func subscribe(topic: String, func_ref: Callable, options: Dictionary) -> String:
var run_if_already_published = options.get("runIfAlreadyPublished", false)