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 / dynalist_bookmark.js
Last active October 21, 2024 13:41
Save current link to dynalist
(function() {
const TOKEN = "YOUR_DYNALIST_TOKEN";
const FILE_ID = "YOUR_FILE_ID";
const INBOX_NODE_ID = "YOUR_INBOX_NODE_ID";
let savedNodeId = null;
let updateTimer = null;
// Utility Functions
// DOM Utils
function createDiv() { return document.createElement('div'); }
@SMUsamaShah
SMUsamaShah / doc.md
Created October 20, 2024 00:42
interesting ai papers
@SMUsamaShah
SMUsamaShah / steam_rating_apis.md
Created October 14, 2024 11:56
Steam API links to find a game's ID by name and then get its steam rating
@SMUsamaShah
SMUsamaShah / list.json
Last active August 28, 2024 21:21
Video Schedule Export
{
"1": {
"1": {
"id": "E77wMx5iRLU",
"playAt": 1724922019,
"duration": 526
},
"2": {
"id": "UgYYLtghx2w",
"playAt": 1724922550,
@SMUsamaShah
SMUsamaShah / set-wallpaper-using-flux-schnell-via-api.ahk
Created August 8, 2024 20:34
AutoHotkey V2 Script to download and set wallpaper using Flux Schnell model via segmind.com API
#Requires AutoHotkey v2.0
; Main function
Main() {
api_key := "YOUR_API_KEY_HERE" ; Replace with your actual API key
url := "https://api.segmind.com/v1/flux-schnell"
jsonData := GetJsonData()
;MsgBox("Debug input json: " . jsonData)
;return
@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 July 11, 2024 14:41
list of domains to be blocked
@SMUsamaShah
SMUsamaShah / fzf clink cmder setup.md
Last active May 30, 2024 10:47
fzf setup for cmder / clink