Skip to content

Instantly share code, notes, and snippets.

View thsunkid's full-sized avatar
🍣

Thu Nguyen thsunkid

🍣
View GitHub Profile
@thsunkid
thsunkid / export_cursor_chat_mac.py
Created February 1, 2026 16:38
Export full Cursor agent chats on macOS
#!/usr/bin/env python3
"""
Export Cursor agent chats on macOS (portable Markdown).
What it does:
- Searches Cursor workspace state DBs for a conversation title (Composer name)
and returns matching composerId(s).
- Locates the corresponding local transcript(s) under ~/.cursor/projects/**/agent-transcripts/
- Writes a Markdown file containing the raw transcript(s), with paths sanitized for sharing.
@thsunkid
thsunkid / slack_archiver.py
Last active June 4, 2023 11:26
Slack Channel Archiver Script
import datetime
from slack_sdk import WebClient
"""Get the SLACK_API_TOKEN:
1. To get a token for this script, create an app at https://api.slack.com/apps (Choose 'From scratch')
2. Go to 'OAuth & Permissions' > 'Scopes' section > 'User Token Scopes' > Add these permissions:
# admin.conversations:write
# admin.conversations:read
# channels:read
# channels:history
@thsunkid
thsunkid / gwnet.py
Last active September 5, 2021 15:11
XLA compilation error for TPU sample code
import os
import math
import time
import random
import numpy as np
import pandas as pd
import torch
import torch.nn as nn