Skip to content

Instantly share code, notes, and snippets.

View 2u841r's full-sized avatar

Zubair Ibn Zamir 2u841r

View GitHub Profile
@2u841r
2u841r / README.md
Last active August 31, 2026 18:14
Workaround for a bad top-edge line on a laptop panel (X11): xrandr shift + cursor clamp

Fixing a bad top-edge line on a laptop panel (X11 / Linux)

A full-width line appeared at the very top of my laptop screen. It shifted color with the background but never disappeared: dimmest on white, brightest with a green/red fringe on black, blue and red. That rules out content bleed and points at hardware, a bad gate line or a loose eDP cable. Overlay masking is useless for this: painting black there makes it more visible, not less.

Workaround below shifts the whole image down past the bad rows and keeps the mouse cursor out of the resulting dead strip. Tested on Linux Mint / Cinnamon, X11, 1920x1080 internal

@2u841r
2u841r / gist:f02adeb2ad82c11c56ea9e911d212593
Last active June 2, 2026 03:55
Claude Usage – Show Local Reset Time
// ==UserScript==
// @name Claude Usage – Show Local Reset Time
// @namespace https://gist.github.com/2u841r/f02adeb2ad82c11c56ea9e911d212593
// @version 1.3
// @description On claude.ai/settings/usage, appends the actual local clock time after the "Resets in 1h 23 min" countdown, e.g. "Resets in 1h 23 min (at 4:23 PM)".
// @author Zubair Ibn Zamir
// @homepageURL https://gist.github.com/2u841r/f02adeb2ad82c11c56ea9e911d212593
// @supportURL https://gist.github.com/2u841r/f02adeb2ad82c11c56ea9e911d212593
// @match https://claude.ai/*
// @license MIT
@2u841r
2u841r / C:\Users\Zubair\AppData\Roaming\FlowLauncher\Logs\1.20.2\2025-10-17.txt
Created October 17, 2025 02:23
C:\Users\Zubair\AppData\Roaming\FlowLauncher\Logs\1.20.2\2025-10-17.txt
01:27:21.3636+06:00 - INFO - App.RegisterExitEvents - Session Ending
05:38:16.7599+06:00 - INFO - Logger.SetLogLevel - Using log level: INFO.
05:38:16.7599+06:00 - INFO - App.OnStartup - Begin Flow Launcher startup ----------------------------------------------------
05:38:16.7599+06:00 - INFO - App.OnStartup - Runtime info:
Flow Launcher version: 1.20.2
OS Version: 26100.6899
IntPtr Length: 8
x64: True
05:38:18.3863+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://fastly.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
05:38:18.4213+06:00 - INFO - CommunityPluginSource.FetchAsync - Loading plugins from https://gcore.jsdelivr.net/gh/Flow-Launcher/Flow.Launcher.PluginsManifest@plugin_api_v2/plugins.json
@2u841r
2u841r / SocialBrowserDetector.tsx
Last active October 6, 2025 23:49
FB shouldn't mess up with your user
"use client";
import React, { useState, useEffect } from "react";
// So your user can see the popup when they open the page in a social media app's internal browser
// This component detects if the user is in a social media app's browser
interface SocialBrowserDetectorProps {
className?: string;
}
// ==UserScript==
// @name DeleteThing - Auto-fill Deletion Fields
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Auto-fills deletion confirmation fields on various platforms
// @author You
// @match https://vercel.com/*/*/settings*
// @match https://app.netlify.com/projects/*/configuration/general*
// @match https://dash.cloudflare.com/*/pages/view/*/settings/production*
// @match https://dash.cloudflare.com/*/workers/services/view/*/production/settings*
@2u841r
2u841r / detect-js-framework.js
Last active June 26, 2025 15:13 — forked from rambabusaravanan/detect-js-framework.js
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');