Skip to content

Instantly share code, notes, and snippets.

View SMUsamaShah's full-sized avatar
🎯
Focusing ... almost

Muhammad Usama SMUsamaShah

🎯
Focusing ... almost
View GitHub Profile
@SMUsamaShah
SMUsamaShah / list_of_sd_artists_styles_links.md
Last active March 28, 2026 02:46
List of Stable Diffusion Artists Styles References
@SMUsamaShah
SMUsamaShah / android_migrate_to_new_phone.md
Last active May 24, 2023 17:36
Migrate and copy all data from old android phone to new android phone
  1. Migrate whatever is possible using googles own migration tool. It will copy most stuff and apps.
  2. Export Google authenticator and import
  3. Import Microsoft authenticator via restore from backup after logging into it.
  4. Copy remaining folders and files using X-plore with wifi sharing or ftp
  5. Un-encrypt / move out locked and encrypted files and copy to new phone e.g. from locked folder in Google Files app
  6. Export chrome/brave open tabs https://android.stackexchange.com/questions/56635/how-can-i-export-the-list-of-open-chrome-tabs/193858
    1. Enable USB debugging on phone
    2. Connect to computer
    3. Open chrome://inspect/#devices
  7. Open devtools on this page and edit inspect.js to remove 100 character url limit (see stackoverflow answer for details), then save and reconnect the device
@SMUsamaShah
SMUsamaShah / sql-wasm-base64.js
Last active March 24, 2025 07:04
SQLite WASM (v1.8.0) as BASE64
const SQLBASE64 = "AGFzbQEAAAABrQRHYAJ/fwF/YAF/AX9gA39/fwBgAX8AYAN/f38Bf2ACf38AYAR/f39/AX9gBX9/f39/AX9gBH9/f38AYAZ/f39/f38Bf2AFf39/f38AYAJ/fgF/YAR/f39+AX9gBn9/f39/fwBgB39/f39/f38Bf2AAAX9gAXwBfGABfgF/YAJ/fgBgA39/fgF/YAJ/fwF+YAAAYAF/AX5gBH9+f38Bf2AHf39/f39/fwBgCX9/f39/f39/fwF/YAh/f39/f39/fwF/YAN/fn8Bf2ACf3wAYAV/fn5+fgBgCX9/f39/f39/fwBgBX9/f39+AGAFf39+f38Bf2ADf39+AGADf35/AGADf35+AX9gAAF8YAF/AXxgBH9+fn8AYAh/f39/f39/fwBgBH5+fn4Bf2ALf39/f39/f39/f38AYAN8fH8BfGACfHwBfGAEf39+fwBgBn9/f35/fwF/YAF+AX5gBX9+f39/AX9gAn9+AX5gBn9/f39/fgF/YAR/f39/AX5gAn5+AXxgCH9+fn9/f39/AX9gAn58AX9gC39/f39/f39/f39/AX9gAnx/AXxgAXwBf2ACfH8Bf2AHf39/f35/fwF+YAl/fn9+fn5+f38Bf2AEf39/fgBgAnx+AX9gCn9/f39/f39/f38Bf2ADf398AX9gB39/f39/fHwAYAF8AX5gBX9+fn5/AX9gCH9/fn5+f39/AX9gBH9+f38AYA1/f39/f39/f39/f39/AGACf38BfALNASIBYQFhAAgBYQFiAAQBYQFjAAEBYQFkACQBYQFlACQBYQFmAAEBYQFnAAQBYQFoAAABYQFpAAABYQFqAAUBYQFrAAcBYQFsAAQBYQFtAAABYQFuAAIBYQFvAAYBYQFwAAQBYQFxAA8BYQFyAAYBYQFzAAEBYQF0AAYBYQF1AAYBYQF2AAYBYQF3AAkBYQF4AAkBYQF5AAQBYQF6AAABYQFBAAABYQFCAAABYQFDAAEBYQFEAAYBY
@SMUsamaShah
SMUsamaShah / diary.ahk
Created January 30, 2023 14:09
Quick Diary/Journal/Notes/Memo entry on windows
; If there is any other way in windows to set global hotkey to run diary.bat you can do that
; Global hotkey Win + \ using AutHotkey script to simply run diary.bat
<#\::Run, d:\diary.bat
@SMUsamaShah
SMUsamaShah / hide_collection_only_items_ebay.js
Last active January 18, 2023 21:31
hide collection only items from ebay search results
for (const elm of [...document.querySelectorAll(".s-item")]) {if (elm.querySelector(".s-item__info > .s-item__details > .s-item__detail > .s-item__shipping") == null) elm.style.display="none"}
@SMUsamaShah
SMUsamaShah / getTitleNative.js
Last active January 9, 2023 18:10 — forked from jbinto/getTitleNative.js
Get title from remote HTML URL - without jQuery
// Only using native browser features (no jQuery).
// Uses `fetch`, `DOMParser` and `querySelectorAll`.
const getTitle = (url) => {
return fetch(url)
.then((response) => response.text())
.then((html) => {
const doc = new DOMParser().parseFromString(html, "text/html");
const title = doc.querySelectorAll('title')[0];
return `${url}, ${title.innerText}`;