Skip to content

Instantly share code, notes, and snippets.

View 6220119's full-sized avatar
🎰

Nguyen Vu Cuong (Ralph) 6220119

🎰
View GitHub Profile
@TongDucThanhNam
TongDucThanhNam / generate-component-hierarchy.ts
Last active April 28, 2026 01:05
Mục đích chính của script là đọc code React/React Native (không cần chạy app) và vẽ ra một cái cây (ASCII tree) mô phỏng chính xác giao diện của bạn sẽ được render ra sao, các component lồng nhau thế nào, và chúng đang mang những class CSS/Tailwind gì ảnh hưởng đến Layout.
#!/usr/bin/env bun
import path from "node:path";
import { parseArgs } from "node:util";
import { parse } from "@babel/parser";
import traverseModule from "@babel/traverse";
const traverse = traverseModule;
// --- CLI CONFIGURATION ---
const HELP_TEXT = `Usage: bun generate-component-hierarchy.ts [options]
#!/usr/bin/env python3
"""
Demonstrate banning the em-dash (and common variants) with logit_bias.
import os, sys, textwrap
import openai # pip install openai>=1.9.0
MODEL = "chatgpt-4o-latest"
PROMPT = ("Write a short sentence that would normally include an em dash "
"(for example between two clauses).")
#!/usr/bin/env bash
# !!! This script may overwrite your current config. Don't blindly execute !!!
# Script to automate Claude Code after installation
# install via `npm install -g @anthropic-ai/claude-code`
# Key features:
# - gets the onboarding wizard out of the way
# - configure API keys
@badlogic
badlogic / 01-update-docs.md
Last active March 16, 2026 01:07
Yakety Documentation (Ordered) - LLM-optimized docs with concrete file references

Update Documentation

You will generate LLM-optimized documentation with concrete file references and flexible formatting.

Your Task

Create documentation that allows humans and LLMs to:

  • Understand project purpose - what the project does and why
  • Get architecture overview - how the system is organized
  • Build on all platforms - build instructions with file references
{
"Bad": {
"Bored": ["Indifferent", "Apathetic"],
"Busy": ["Pressured", "Rushed"],
"Stressed": ["Overwhelmed", "Out of control"],
"Tired": ["Sleepy", "Unfocussed"]
},
"Fearful": {
"Scared": ["Helpless", "Frightened"],
"Anxious": ["Overwhelmed", "Worried"],
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active April 9, 2026 08:58
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@ScriptedAlchemy
ScriptedAlchemy / CursorTools.json
Created January 31, 2025 03:54
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@willccbb
willccbb / grpo_demo.py
Last active April 17, 2026 04:37
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@rsms
rsms / macos-distribution.md
Last active April 15, 2026 12:15
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@dhh
dhh / linux-setup.sh
Last active May 4, 2026 20:47
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \