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 / claude_3.5_sonnet_artifacts.xml
Last active September 21, 2024 20:11 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt (Updated) + markdown code blocks inside artifact tag (to use in other chat clients)
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@SMUsamaShah
SMUsamaShah / reduce_google_photos_video_size.md
Last active June 20, 2024 12:33
Reduce size of Google Pixel (Android phone) videos (from Google Photos) while preserving metadata
  1. Plug your phone with usb
  2. copy large videos
  3. use the given batch script (requires ffmpeg.exe and exiftool.exe). Can simply drag drop a video on the .bat file to start conversion.
  4. copy the out file back to phone
  5. delete original large file from phone using Google photos

NOTE: the ffmpeg command uses Intel GPU acceleration using -c:v hevc_qsv. Change it if you want/need. for Nvidia GPU, use -c:v hevc_nvenc

@SMUsamaShah
SMUsamaShah / list of blockable domains.md
Last active March 14, 2026 01:21
List of content farm websites to block
@SMUsamaShah
SMUsamaShah / fzf clink cmder setup.md
Last active May 14, 2025 09:56
fzf setup for cmder / clink
@SMUsamaShah
SMUsamaShah / gmail_sort_by_sender.js
Last active March 3, 2025 07:51
Gmail sort by sender bookmarklet (drag the code to bookmark bar)
javascript:(function() {
function sortEmailsBySender() {
var emails = Array.from(document.querySelectorAll('.zA'));
emails.sort(function(a, b) {
var senderA = a.querySelector('.yW span').innerText.toLowerCase();
var senderB = b.querySelector('.yW span').innerText.toLowerCase();
return senderA.localeCompare(senderB);
});
emails.forEach(function(email) {
email.parentNode.appendChild(email);
@SMUsamaShah
SMUsamaShah / list_of_fast_windows_softwares.md
Last active June 3, 2024 16:47
List of Fast (no-bloat) Windows Softwares

Actually Fast Windows Tools

A good criteria to judge if a tool will be fast is often the package size. Tools in or under 10s of MBs usually do one thing and do it really well.

Tools listed here have fast/instant startup and/or handles large files without slowing everything down.

Document Editors / Viewers

  1. Notepad++ https://notepad-plus-plus.org/
  2. Notepad2 Notepad3 (not sure if these are actually fast)
@SMUsamaShah
SMUsamaShah / sort roms by genre.md
Last active February 28, 2025 17:29
Sort ROM files by Genre using ChatGPT

I tried writing shell script, then actual code for this. Found some lists

https://github.com/Wiimpathy/CreateCat/blob/master/data/GBA/GBA_list.txt https://github.com/libretro/libretro-database/blob/master/metadat/genre/Nintendo%20-%20Game%20Boy%20Advance.dat

and even tried screenscraper api

but the problem always was finding and matching names correctly.

Gave up on that and simply used ChatGPT. It's reliable enough. Not many mistakes and even if it makes mistakes its not that big deal and overall this method is lot less painfull.

@SMUsamaShah
SMUsamaShah / libretro_genre_to_json.sh
Last active February 28, 2025 17:26
Bash script to convert libretro genre metadata .dat files to json (works on miyoo mini)
#!/bin/sh
input_file="gba.dat"
output_file="output.json"
# declare -A crc_to_genre
# declare -A name_to_genre
inside_game_block=false
crc_to_genre_json=""