Skip to content

Instantly share code, notes, and snippets.

View anxkhn's full-sized avatar
🚀
tinkering...

Anas Khan anxkhn

🚀
tinkering...
View GitHub Profile
# DSA Question Bank
## Arrays, Hashing, Prefix/Suffix
1. Find the second largest element in one pass without extra space.
2. Find the k largest distinct elements without fully sorting the array.
3. Find the two numbers that appear once when every other number appears twice.
4. Find the majority element that appears more than n / 2 times.
5. Find all elements that appear more than n / 3 times.
6. Count inversions in an array.
@sigridjineth
sigridjineth / x-audience-warmup_SKILL.md
Created April 14, 2026 09:00
I made a skill for OpenClaw/Hermes Agents from cailynyongyong's HOW TO GO VIRAL ON X
name x-audience-warmup
description Use when starting an X (Twitter) account from scratch, when follower count is below 500, or when preparing an account to receive viral traffic before posting demo videos or trend-hijacking content.

Overview

A cold X account with no followers wastes viral content. This skill covers the warm-up phase: getting from 0 to 500-1000 followers before deploying x-viral-demo-video or x-trend-hijacking posts.

Expected timeline: ~9 months from first post to first viral moment.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

Quickstart: GLM-4.6V-Flash with mlx-vlm on macOS (Apple Silicon)

This guide walks you through setting up a minimal project that uses mlx-vlm to run the

mlx-community/GLM-4.6V-Flash-4bit vision model on a sample image.

1. Install uv (if not installed)

@ankurpandeyvns
ankurpandeyvns / zyxel_backup_restore.py
Last active June 28, 2026 08:41
AOT-5221ZY Backup/Restore Decryption+Encryption
#!/usr/bin/env python3
"""
================================================================================
Zyxel Router Configuration Backup/Restore Tool
================================================================================
DESCRIPTION:
This tool provides comprehensive functionality for working with Zyxel router
configuration backups. It can download, decrypt, encrypt, and restore
@PrinceSinghhub
PrinceSinghhub / 22 Key DSA Patterns with Must-Solve Problems! 💡.md
Last active June 6, 2026 05:26
After solving and observing many interview problems, I’ve identified key patterns that will help you solve them.

Problem-Solving Techniques and Patterns

1. Fast and Slow Pointer

Description: This technique uses two pointers moving at different speeds to solve problems involving cycles, such as finding the middle of a list, detecting loops, or checking for palindromes.

  • Linked List Cycle II
  • Remove nth Node from the End of List
  • Find the Duplicate Number
  • Palindrome Linked List
@OrionReed
OrionReed / dom3d.js
Last active June 21, 2026 07:00
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active June 30, 2026 09:26
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code