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 in-browser VMs.md
Last active December 5, 2025 03:40
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
@SMUsamaShah
SMUsamaShah / filter-epic-games.js
Last active September 24, 2020 10:13
Filter Epic Game Store by Price
// open https://www.epicgames.com/store/en-US/browse?pageSize=1000
// paste in console and run
function filterEpicGames(min = 0, max = 15) {
let games = document.querySelectorAll("#dieselReactWrapper > div > div[class*='AppPage__bodyContainer'] > main > div > div > div > div > div > section > div > div > div > section > div > section > section > ul > li > a > div > div > div[class*='OfferCard__meta']");
let c = 1;
for (let i = 0; i < games.length; i++) {
let name = games[i].firstChild.innerText;
let priceText = (games[i].lastChild.lastChild.lastChild ? games[i].lastChild.lastChild.lastChild.lastChild.nodeValue : games[i].lastChild.lastChild.nodeValue);
let price = 0;
@SMUsamaShah
SMUsamaShah / Java notes.md
Last active June 14, 2020 19:18
Braindump for OCAJP, Oracle Certified Associate, Java SE 8 Programmer I

I wrote these while preparing for OCAJP exam. Most of it is in form of code with output right next to it as a comment.

Chapter 1 and 2

Classes

One java file can have multiple classes, maximum only one class can be public.

## Knowledge DBs
- http://www.yacoset.com/
- https://programming-idioms.org/
- http://lambda-the-ultimate.org/
- http://www.linfo.org/
- https://programmingisterrible.com/
- http://blog.cleancoder.com - Uncle Bob Martin
## Articles