Skip to content

Instantly share code, notes, and snippets.

@semanticentity
semanticentity / gist:f3c1db338c4529c0ec94c990cfce3732
Last active October 16, 2023 18:59
Bookmarklet: Switch from Google to Bing
javascript:(function(){
let url = window.location.href;
let query;
if(url.includes('google.com/search?q=')){
query = url.split('google.com/search?q=')[1].split('&')[0];
window.location.href = 'https://www.bing.com/search?q=' + query;
}
else if(url.includes('bing.com/search?q=')){
query = url.split('bing.com/search?q=')[1].split('&')[0];
window.location.href = 'https://www.google.com/search?q=' + query;
@semanticentity
semanticentity / gist:14d3380ad985165769f1c04b17fbed1c
Created January 31, 2024 05:09
Bookmarklet to check if a URL is in Google's cache and/or comes up in site: operator searches
javascript:(function() { var currentPageUrl = encodeURIComponent(window.location.href); var googleCacheUrl = 'https://webcache.googleusercontent.com/search?q=cache:%27 + currentPageUrl; var siteSearchUrl = %27https://www.google.com/search?q=site:%27 + currentPageUrl; window.open(googleCacheUrl, %27_blank%27); window.open(siteSearchUrl, %27_blank%27);})();
@semanticentity
semanticentity / gist:dccd1541d15c8bbb390bea75e2db8738
Created February 23, 2024 06:23
Remove All Reddit Results from Google SERPs
javascript:document.querySelectorAll('a[href*="reddit.com"]').forEach(e=>{for(var r=e;r&&"DIV"!==r.tagName;)r=r.parentNode;r&&r.parentNode&&r.parentNode.removeChild(r)});
@semanticentity
semanticentity / openai-chat-playground-layout-fix.css
Last active May 14, 2024 05:48
OpenAI Chat Playground Layout Fix CSS
/* Apply to: https://platform.openai.com/playground/chat */
.interactive {
display: inline-block !important;
border: .04rem solid #999 !important;
width: 66%;
min-height: 100px;
float: right !important;
margin-bottom: 10px;
}
@semanticentity
semanticentity / gist:5a9149211a70233adeac777988fd5ca6
Created May 31, 2024 22:11
Redirect Arc Browser autodirect traffic back to where they belong
window.addEventListener("load", function() {
setTimeout(function(){
const isBackgroundSet = getComputedStyle(document.documentElement).getPropertyValue('--arc-palette-background') ? 'Yes' : 'No';
console.log('1 second after window load: ', isBackgroundSet);
if (isBackgroundSet === 'Yes') {
window.location.href = 'https://www.yahoo.com';
}
}, 1000);
});
@semanticentity
semanticentity / lewm.js
Last active May 5, 2025 16:46
LEWM: Loom, Except Without Money
javascript:(async function(){
if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia){
alert("Screen recording not supported");
return;
}
var filename = prompt("Make sure you are in a tab other than the one you are recording.\nEnter filename (no extension):","lewm-recording");
if(!filename) filename = "lewm-recording";
alert("Select a TAB and check 'Share tab audio' in the popup. For audio, do NOT chose full screen or window.");
@semanticentity
semanticentity / robots.txt
Last active May 15, 2025 17:26
robots.txt 2025
# Welcome our new insect overlords
User-agent: Googlebot
Allow: /
User-agent: Bingbot
Allow: /
User-agent: Applebot
Allow: /
@semanticentity
semanticentity / awesome-gtm-quick-wins.md
Created June 18, 2025 22:14
Awesome Google Tag Manager Quick Wins

Awesome GTM Quick Wins

A collection of dead-simple, high-impact Google Tag Manager recipes for marketers, analysts, and developers who want results without touching the production codebase.

This is a plug-and-play library of GTM tags, triggers, and variables that will supercharge your analytics, unlock conversion insights, and make your clients or boss wonder how they ever lived without you.


How This Works (For Beginners)

@semanticentity
semanticentity / index.html
Created August 30, 2025 02:27
WHITE DWARF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WHITE DWARF</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>