This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function appendUTMParams(domains) { | |
// Get all the links on the page | |
var links = document.getElementsByTagName("a"); | |
// Get the UTM parameters from the URL | |
var search = window.location.search; | |
var params = new URLSearchParams(search); | |
// Array of allowed UTM parameters | |
var allowedUTMs = ["utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the UTM parameters from the URL | |
var search = window.location.search; | |
var params = new URLSearchParams(search); | |
// Keep track of if an event has already been logged | |
var eventLogged = false; | |
// Loop through each UTM parameter | |
for (var [key, value] of params.entries()) { | |
// Check if the parameter is "utm_source", "utm_medium", "utm_campaign", "utm_term", or "utm_content" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteNotionToggleElements() { | |
const elements = document.getElementsByClassName("notion-toggle"); | |
while (elements.length > 0) { | |
elements[0].parentNode.removeChild(elements[0]); | |
} | |
} | |
document.addEventListener("DOMContentLoaded", function() { | |
deleteNotionToggleElements(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir imgs | |
res=() | |
for lhs in -1 1 | |
do | |
for rhs in $(seq -w 0 99) | |
do | |
res+=("${lhs}.${rhs}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Success<T> = { | |
data: T | |
error: undefined | |
} | |
export type Failure<E> = { | |
data: undefined | |
error: E | |
} |