Skip to content

Instantly share code, notes, and snippets.

View hoangtrung99's full-sized avatar
⚔️

Nguyễn Hoàng Trung hoangtrung99

⚔️
View GitHub Profile
@hoangtrung99
hoangtrung99 / tmux-guide.md
Created March 21, 2026 14:51
Tmux complete usage guide (Vietnamese) - 11 plugins, keybindings, workflows, troubleshooting

Hướng Dẫn Sử Dụng tmux - Tài Liệu Tham Khảo Đầy Đủ

Dành cho developer đã cấu hình đầy đủ tmux với 11 plugins. Tài liệu này bao gồm mọi keybinding, plugin, và workflow thực tế.


Mục Lục

  1. Tổng Quan
  2. Bắt Đầu Nhanh
@hoangtrung99
hoangtrung99 / tmux-setup.sh
Last active March 21, 2026 15:26
Tmux full setup script - 11 plugins, catppuccin mocha, context-aware status bar, popup help
#!/bin/bash
# ═══════════════════════════════════════════════════════════════
# Tmux Setup Script - Automated installation & configuration
# ═══════════════════════════════════════════════════════════════
#
# USAGE:
# curl -fsSL <gist-raw-url> | bash
# OR: bash setup-tmux.sh
#
# WHAT THIS DOES:
@hoangtrung99
hoangtrung99 / AGENTS.md
Created February 3, 2026 07:49
agent engineer system prompt

SENIOR SOFTWARE ENGINEER

<system_prompt> You are a senior software engineer embedded in an agentic coding workflow. You write, refactor, debug, and architect code alongside a human developer who reviews your work in a side-by-side IDE setup.

Your operational philosophy: You are the hands; the human is the architect. Move fast, but never faster than the human can verify. Your code will be watched like a hawk—write accordingly.

@hoangtrung99
hoangtrung99 / autotrader.sh
Last active August 4, 2025 08:54
AutoTrader Bot Script - Updated 2025-08-04 08:54:48 UTC
#!/bin/bash
#!/bin/bash
# AutoTrader Bot - Compact Version (Server Deployment Script)
# Focused on core deployment and system operations
# Complex logic moved to Python CLI tools
set -euo pipefail
# Version and basic config
SCRIPT_VERSION="3.3.3"
@hoangtrung99
hoangtrung99 / axios.ts
Last active April 10, 2025 06:02
axios instance handle refresh token
import axios, { type AxiosError, type InternalAxiosRequestConfig, type AxiosResponse } from 'axios'
/**
* Create axios instance with default configuration
*/
const request = axios.create({
baseURL: import.meta.env.VITE_API_URL,
timeout: 5000
})
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<true/>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
@hoangtrung99
hoangtrung99 / giaiphapykhoa.js
Last active August 30, 2023 08:06
download giaiphapykhoa
// ==UserScript==
// @name Download giaiphapykhoa pdf
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Download giaiphapykhoa.com!
// @author https://github.com/hoangtrung99
// @match https://giaiphapykhoa.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
@hoangtrung99
hoangtrung99 / cd-cloudrun.yml
Last active March 17, 2023 13:30
CD google cloud run
# SETUP
# 1. Enable Google Cloud Run API
# 2. Enable Google Artifact Registry API
# 3. Create a service account with the following roles:
# - Cloud Run Admin
# - Artifact Registry Administrator
# - Cloud Run Service Agent
# - Service Account User
# 4. Setup a GitHub secret called GOOGLE_CREDENTIALS with the service account key
# 5. Create a Google Artifact Registry repository
@hoangtrung99
hoangtrung99 / EchartReact.ts
Last active January 5, 2023 04:18
React component for react
import type { ECharts, SetOptionOpts } from 'echarts/core'
import { getInstanceByDom, init } from 'echarts/core'
import { ECBasicOption } from 'echarts/types/dist/shared'
import { forwardRef, useEffect, useImperativeHandle, useRef } from 'react'
// Redeclare forwardRef
declare module 'react' {
function forwardRef<T, P = Record<string, unknown>>(
render: (props: P, ref: React.Ref<T>) => React.ReactElement | null
): (props: P & React.RefAttributes<T>) => React.ReactElement | null
@hoangtrung99
hoangtrung99 / imgToPdf.js
Last active August 26, 2023 16:07
Download pdf from gg drive without permission
let jspdf = document.createElement("script");
jspdf.onload = function () {
const { jsPDF } = window.jspdf;
let pdf = new jsPDF();
let elements = document.getElementsByTagName("img");
for (let i in elements) {
let img = elements[i];
if (!/^blob:/.test(img.src)) {
continue;
}