Skip to content

Instantly share code, notes, and snippets.

@Noodlebox1
Noodlebox1 / tabrenamer.js
Created December 26, 2025 23:01
bookmarklet for renaming tabs and changing favicons.
javascript:(function(){!function(){document.title=prompt("tab title",document.title);let e=document.querySelector("link[rel~='icon']");e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=prompt("new favicon url (press cancel to keep it the same)")}();}());
@ulrischa
ulrischa / showstorage.js
Created December 25, 2025 16:27
Bookmarklet to show localStorage and sessionStorage
javascript:(()=>{try{const dump_storage=(name)=>{const result={name,ok:false,error:null,items:{}};let s=null;try{s=window[name];}catch(e){result.error=`Accessing window.${name} threw: ${String(e)}`;return result;}if(!s){result.error=`window.${name} is not available`;return result;}let len=0;try{len=s.length;}catch(e){result.error=`${name}.length threw: ${String(e)}`;return result;}const keys=[];for(let i=0;i<len;i++){try{keys.push(s.key(i));}catch(e){keys.push(null);result.error=(result.error?result.error+"\n":"")+`${name}.key(${i}) threw: ${String(e)}`;}}for(const k of keys){if(k===null)continue;try{result.items[k]=s.getItem(k);}catch(e){result.items[k]=null;result.error=(result.error?result.error+"\n":"")+`${name}.getItem(${JSON.stringify(k)}) threw: ${String(e)}`;}}result.ok=result.error===null;return result;};const payload={origin:location.origin,href:location.href,timestamp:new Date().toISOString(),localStorage:dump_storage("localStorage"),sessionStorage:dump_storage("sessionStorage")};const text=JSON.st
@semanticentity
semanticentity / wellformed-robotstxt.js
Last active January 4, 2026 00:18
Heuristic robots.txt validator — detects malformed structure, orphaned rules, missing User-agent, sitemap issues, and unknown directives in-place. Optimized for real-world crawler behavior.
(function () {
/**
* Recognized directives (ignored if unknown)
* This is NOT a strict allowlist — unknowns are warnings only
*/
var KNOWN_DIRECTIVES = [
"user-agent",
"allow",
"disallow",
"sitemap",
@the-code-rider
the-code-rider / hf-datastudio.md
Created December 22, 2025 11:40
sample prompts from hugging face data studio

title generation

{
    "messages": [
        {
            "role": "system",
            "content": "You are an assistant who generates concise titles for SQL written for Hugging Face Datasets."
        },
        {
            "role": "user",
(() => {
// 1) Find the biggest table on the page (handles cases with multiple tables)
const tables = [...document.querySelectorAll("table")];
if (!tables.length) throw new Error("No <table> elements found.");
const table = tables
.map(t => ({ t, rows: t.querySelectorAll("tbody tr").length }))
.sort((a, b) => b.rows - a.rows)[0].t;
// 2) Extract header
@davidfpease
davidfpease / abtesting.js
Last active January 8, 2026 18:44
Change Drift Behavior for A/B Testing
//variant A: Drift will not pop open the full chat window, hook message is automatically dismissed
"use strict";
!function () {
var t = window.driftt = window.drift = window.driftt || [];
if (!t.init) {
if (t.invoked)
return void (window.console && console.error && console.error("Drift snippet included twice."));
t.invoked = !0,
t.methods = ["identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on"],
@xPaw
xPaw / steam-friends-since-display.user.js
Last active March 7, 2026 23:46
Display "friend since" dates on Steam Community friend pages
// ==UserScript==
// @name Steam Friends Since Display
// @namespace xpaw-steam-friends-since-display
// @version 1.0.0
// @description Display "friend since" dates on Steam Community friend pages
// @author Claude
// @match https://steamcommunity.com/id/*/friends*
// @match https://steamcommunity.com/profiles/*/friends*
// @icon https://steamcommunity.com/favicon.ico
// @grant none
@SnarkyDeveloper
SnarkyDeveloper / helper.js
Last active January 4, 2026 00:08
Inline Helper - Browser JS/Bookmarklet
(function() {
"use strict";
let messages = [];
const baseUrl = 'https://text.pollinations.ai/';
const system =
'You are a simple browser agent model that returns short answers to the user, consise and simple. Selections by user in browser will be indicated by SELECTION[text], where text is what is currently selected. You will not bring up specific things like SELECTION[text]';
function toMessage(role, content, image_blob=undefined) {
if (image_blob) {
let r = { role: role, content: [{type: "text", text: content}] };
@Sirofjelly
Sirofjelly / sync_contact_directory_to_contacts.js
Last active May 11, 2026 07:47
Syncing of Google Workspace Directory to Personal Contacts
// --- README ---
// This script fetches all google workspace directory contacts of ipt and adds them to the user directory.
// This allows to see who is calling and searching for contacts on ios.
// The script deletes old contacts with an email adress ending in @ipt.ch from the user directory.
// This guarantees that no stale contacts exist from previous employees.
function syncDirectoryToConnections() {
try {
// --- STEP 1: Fetch Directory Users (Including Aliases) ---
let pageToken;
@manfred-hinsch
manfred-hinsch / smart-trantype.css
Last active January 1, 2026 09:52
smart-trantypes
/* smart-trantype.css - visual styles */
#main.col620 {
width: 100% !important;
}
/* table */
#transaction-table {
border-collapse: collapse;
width: 100%;