Skip to content

Instantly share code, notes, and snippets.

View smashah's full-sized avatar
🏠
Working from home

Mohammed Shah smashah

🏠
Working from home
  • I don't know, yno
  • LHR/JED
View GitHub Profile
@smashah
smashah / proxmox-ubuntu-resize
Last active May 1, 2024 10:36
Resize Ubuntu on proxmox hd size
Based on:
https://gist.github.com/gjrdiesel/4e93d8743b71babb58dcba4ee049247c
https://www.reddit.com/r/Proxmox/comments/hkvl9a/cant_extend_ubuntu_20_lvm_after_expanding_raw_disk/
1.
`lsblk`
@smashah
smashah / gumroad_docusaurus_cart_fix.js
Created October 13, 2022 02:43
Prevent gumroad cart messing with docusaurus. Reposition cart button sensibly on docusaurus.
(new MutationObserver((mutationList, observer) => {
for (const mutation of mutationList) {
if(mutation.type === "childList" && mutation.addedNodes.find(node=>node.className==="gumroad")) {
console.log('Gattem', mutation);
const grNode = mutation.addedNodes.find(node=>node.className==="gumroad")
const cartbtn = grNode.getElementsByClassName('cart-button')[0]
grNode.style.position = cartbtn.style.position = ''
grNode.style.padding = '4px'
const isMobile = !!document.getElementsByClassName('menu__list').length
const addTo = document.getElementsByClassName('menu__list')[0] || document.getElementsByClassName("navbar__items navbar__items--right")[0]
@smashah
smashah / gist:21a5c324ec6c02be1cc7f62c21f4a460
Created September 13, 2023 18:42
Simple Script to get the mount path of an SD card on Macbook Pro
system_profiler SPStorageDataType | awk 'BEGIN {RS=""; FS="\n"} /Built In SDXC Reader/ {print $0}' | grep 'Mount Point:' | awk -F': ' '{printf "%s", $2}'
@smashah
smashah / goog-takeout-bulk-download.sh
Created August 21, 2025 05:11
A bash script for bulk downloading Google Takeout files via command line with concurrent downloads and real-time progress tracking.
#!/usr/bin/env bash
# takeout-wget.sh
set -euo pipefail
# Requirements: bash, wget, sed, awk, tput, tail, curl
# macOS-friendly; avoids stdbuf if not present. Shows K per-worker progress lines + total.
cleanup() {
tput cnorm || true
# Kill background processes
@smashah
smashah / gist:f6192d7af114ca059b3a47b33ec1df18
Created October 19, 2025 15:57
example llm:// URI scheme link
llm://>2024?You%20are%20an%20expert%20in%20onboarding%20potential%20businesses%20to%20the%20nanoCTOs%20platform%20called%20Yocto.is.%20Keep%20asking%20clarifying%20questions%20until%20the%20following%20details%20are%20sufficiently%20answered%3A%0A%0ABasic%20Business%20Elevator%20Pitch%0A%0AWhat%20problem%20are%20you%20facing%0A%0AHow%20do%20you%20expect%20a%20Yocto%20to%20help%20you%0A%0Amake%20sure%20to%20output%20in%20the%20format%20layed%20out%20in%20the%20schema%0A%0A=schema=ew0KICAiJHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA3L3NjaGVtYSMiLA0KICAiJGlkIjogImh0dHA6Ly95b2N0by5pcy9vbmJvYXJkaW5nX2RldGFpbHMuc2NoZW1hLmpzb24iLA0KICAidGl0bGUiOiAiWW9jdG8uaXMgQnVzaW5lc3MgT25ib2FyZGluZyBEZXRhaWxzIiwNCiAgImRlc2NyaXB0aW9uIjogIlNjaGVtYSBmb3IgZ2F0aGVyaW5nIGVzc2VudGlhbCBkZXRhaWxzIGZyb20gYSBwb3RlbnRpYWwgYnVzaW5lc3MgcGFydG5lciBmb3IgdGhlIG5hbm9DVE8gcGxhdGZvcm0sIFlvY3RvLmlzLiIsDQogICJ0eXBlIjogIm9iamVjdCIsDQogICJwcm9wZXJ0aWVzIjogew0KICAgICJidXNpbmVzc19uYW1lIjogew0KICAgICAgInR5cGUiOiAic3RyaW5nIiwNCiAgICAgICJkZXNjcmlw