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 / 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}`;
@SMUsamaShah
SMUsamaShah / List of in-browser VMs.md
Last active March 3, 2025 18:05
List of Javascript based virtual machines running in browser
@SMUsamaShah
SMUsamaShah / keyboardsmash.html
Last active September 15, 2022 13:31
let little kids/toddlers/infants smash your keyboard as they please
<html>
<div id="app"></div>
<script>
'use strict';let zzfx,zzfxV,zzfxX
// ZzFXMicro - Zuper Zmall Zound Zynth - v1.1.8 ~ 884 bytes minified
zzfxV=.3 // volume
zzfx= // play sound
(p=1,k=.05,b=220,e=0,r=0,t=.1,q=0,D=1,u=0,y=0,v=0,z=0,l=0,E=0,A=0,F=0,c=0,w=1,m=0,B=0)=>{let
M=Math,R=44100,d=2*M.PI,G=u*=500*d/R/R,C=b*=(1-k+2*k*M.random(k=[]))*d/R,g=0,H=0,a=0,n=1,I=0
@SMUsamaShah
SMUsamaShah / move_my_documents_to_d_drive.reg
Created November 7, 2021 22:32
Registry file to Move My Documents to D:\MyDocuments in Windows 10
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Personal"=hex(2):44,00,3a,00,5c,00,4d,00,79,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,00,00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Personal"="D:\\MyDocuments"
@SMUsamaShah
SMUsamaShah / l-system-list.md
Last active October 10, 2021 14:29
List of online L-System Generators
@SMUsamaShah
SMUsamaShah / task_graph.groovy
Last active February 16, 2021 18:36 — forked from jrodbx/task_graph.groovy
Graphviz visualization of a Gradle project's task graph
gradle.taskGraph.whenReady {
println "rootProject: " + rootProject.name
println "childProjects: " + rootProject.childProjects
def dot = new File(rootProject.buildDir, 'project.dot')
dot.delete()
def command = "./gradlew " + gradle.startParameter.getTaskNames().join(" ")
println "command: " + command