Skip to content

Instantly share code, notes, and snippets.

View tuhuynh27's full-sized avatar

Tu Huynh tuhuynh27

View GitHub Profile
@tuhuynh27
tuhuynh27 / keymap.json
Created July 4, 2026 18:20
~/.config/zed/keymap.json
[
{
"context": "Workspace",
"use_key_equivalents": true,
"bindings": {
"cmd-shift-g": "git_panel::ToggleFocus"
}
},
{
"context": "Terminal",
@tuhuynh27
tuhuynh27 / settings.json
Created July 4, 2026 18:19
~/.config/zed/settings.json
{
"use_system_window_tabs": false,
"bottom_dock_layout": "contained",
"tabs": {
"file_icons": true,
"git_status": true
},
"tab_bar": {
"show": true
},
@tuhuynh27
tuhuynh27 / alacritty.toml
Created July 4, 2026 18:16
Alacritty Config
[font]
size = 14.0
[window]
decorations = "full"
padding = { x = 12, y = 12 }
opacity = 1.0
[colors.primary]
background = "#282828"
@tuhuynh27
tuhuynh27 / zed.md
Created June 16, 2026 08:39
ZED setup

Zed Setup Notes

Restore these files on a new machine to make Zed behave closer to VS Code.

Settings

File:

~/.config/zed/settings.json
@tuhuynh27
tuhuynh27 / activity_insight.md
Last active June 12, 2026 19:04
TCPW Activity Insights

Activity Insights

Query window: 2026-05-13T18:56:26Z to 2026-06-12T18:56:26Z

Filter: excludes admin tiers -1 and -2.

Summary

Metric Value
@tuhuynh27
tuhuynh27 / report.md
Last active June 1, 2026 17:59
REPORT.md

Subscription Issue


What happened

Some people who cancelled their subscription or stopped paying were still getting premium access for free. Normally, when someone's paid period ends, our system should drop them back to the Free plan automatically. That automatic step was broken, so 69 accounts kept their paid features without paying. We've now reset all of them, double-checked everything against Stripe (our payment provider), and fixed the underlying bugs.


Embed Height Reporter — Setup Guide

This guide is for the embed app at rate.tapchiphowall.com (a separate Nuxt project). It explains how to make the embed report its content height to the parent (tapchiphowall.com / en.tapchiphowall.com) so the parent's <iframe> resizes correctly when content inside the embed changes (tab switches, async data loads, etc.).

Why this is needed

Browsers enforce same-origin policy: tapchiphowall.com cannot read the height of an iframe served from rate.tapchiphowall.com. The parent has no way to detect content reflows inside the embed unless the embed cooperates by posting its current height via window.parent.postMessage(...).

Polling from the parent only works if the embed responds to height-request messages. The cleanest fix is for the embed to push height updates whenever its own content changes — no polling required.

@tuhuynh27
tuhuynh27 / tcpw_design_language.md
Last active April 30, 2026 05:00
TCPW Design Language

Design Language — Tạp Chí Phố Wall

Authoritative styling guide for building new pages, components, and UI in this codebase. Follow these rules exactly so new screens look and feel like the rest of the product.

The product visual identity is Editorial / Vietnamese Wall Street Journal — restrained typography, dotted/dashed dividers, hairline borders, generous whitespace, square-ish corners (≤ 4 px on cards, 0 on most controls), and accent color used sparingly. Avoid "SaaS-y" rounded pills, gradients, and deep shadows.


1. Theme System

@tuhuynh27
tuhuynh27 / prompt.md
Created March 25, 2026 12:10
TCPW EI

How the HTML integrates with the app

Rendering context

The HTML is rendered inside this wrapper in pages/economic-insights/[slug].vue:

<div class="insight-html-content" :data-locale="locale" v-html="insight.body_html"></div>
@tuhuynh27
tuhuynh27 / stock-ai-prompt.md
Last active November 8, 2025 12:53
AI Prompt

You are a CFA charterholder and senior equity research analyst with 15+ years of experience specializing in balanced fundamental analysis with a focus on risk-adjusted returns.

YOUR ROLE & APPROACH:

  • Think like a professional equity research analyst providing balanced, institutional-quality analysis
  • Apply disciplined valuation methodology while recognizing different company stages
  • Consider both opportunities and risks with appropriate weighting
  • Provide clear, actionable recommendations based on thorough analysis

MARGIN OF SAFETY FRAMEWORK (Adapted by Company Type):

  • MATURE/VALUE COMPANIES (established, profitable): Look for 15-20% upside potential for Buy