Skip to content

Instantly share code, notes, and snippets.

View tuanchauict's full-sized avatar
🐟
I am lazy

Tuan Chau tuanchauict

🐟
I am lazy
View GitHub Profile
@tuanchauict
tuanchauict / README.md
Created October 19, 2025 08:08
FAANG Topological Sort Problem Collection

📚 FAANG Topological Sort Problem Collection

Here's a curated list of topological sort problems frequently asked by FAANG companies, organized by difficulty and problem pattern.


🟢 Foundation Level (Must Master)

1. Course Schedule

Link: https://leetcode.com/problems/course-schedule/

0. Sample code

// FooCrawler
fun readPage(url: String): Pair<String, String?> {
    try {
        val content = fetchPage(url)
        ...
        val nextPageUrl = extractNextPageUrl(content)
        return Pair(content, nextPageUrl)
    } catch (e: Exception) {
@tuanchauict
tuanchauict / thread-redirect-tampermonkey.js
Created June 4, 2025 23:25
Redirect threads to following
// ==UserScript==
// @name Redirect threads
// @namespace http://tampermonkey.net/
// @version 2025-05-22
// @description try to take over the world!
// @author You
// @match https://www.threads.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=threads.com
// @grant none
// ==/UserScript==
@tuanchauict
tuanchauict / claude-message-jump.js
Last active August 9, 2025 18:05
A short tampermonkey script for adding a Nav Bar for Claude.ai that helps navigate through conversation messages
// ==UserScript==
// @name Claude.ai Navigation Bar
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Creates a navigation bar on the right side of Claude.ai that helps navigate through conversation messages
// @author You
// @match https://claude.ai/*
// @grant GM_addStyle
// ==/UserScript==

Suy nghĩ độc lập trong thời đại thông tin số: Vấn đề "nghèo tư duy"

Trong xã hội hiện đại, một dạng nghèo khó mới đang ngày càng phổ biến - không phải nghèo về vật chất mà là "nghèo tư duy". Hiện tượng này thể hiện qua việc thiếu khả năng suy nghĩ độc lập, phụ thuộc quá mức vào mạng xã hội và khuynh hướng chạy theo tâm lý đám đông. Đây là một vấn đề xã hội đáng quan tâm, có tác động sâu rộng đến cả cá nhân và cộng đồng.

Định nghĩa về "nghèo tư duy"

"Nghèo tư duy" không đơn thuần là thiếu kiến thức, mà còn là sự thiếu hụt khả năng phân tích thông tin một cách phản biện, tư duy độc lập và áp dụng nguyên lý cơ bản (first principle thinking) trong quá trình nhận thức. Người bị "nghèo tư duy" thường:

  • Khoán trắng suy nghĩ cho mạng xã hội: Tin tưởng mù quáng vào thông tin từ Facebook, TikTok mà không kiểm chứng
  • Thiếu tư duy phản biện: Không đặt câu hỏi về độ tin cậy của nguồn thông tin
@tuanchauict
tuanchauict / auto-click-block.js
Created April 21, 2025 04:46
Auto click Block on Threads
function autoClickBlock() {
const dialogBody = document.evaluate(
`//*[contains(text(), "won't be able to find your profile")]`,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
if (!dialogBody) {
@tuanchauict
tuanchauict / README.md
Last active January 15, 2025 01:16
Archive Quick Access Button

Archive Quick Access Button

A simple JavaScript script that adds a floating "Archive" button to specific news websites, allowing quick archiving via archive.md.

image image
@tuanchauict
tuanchauict / README.md
Last active June 11, 2024 22:03
Make SBI simpler to use as a Non-Japanese speaker (definitely, this works along with Google Translate)

As a non-Japanese speaker (reader), it's hard for me to know how to use SBI website sbisec.co.jp. Although there is Google Translate, it's not good in handling text in images (Safari can but it's not really good or fast).

Luckily, SBI website uses static images for buttons, therefore, we can replace the image button with text button.

Demonstrate:

image

To use this, you can use any extensions that can inject script and stylesheet into the page or create your own extension.

@tuanchauict
tuanchauict / flow.ts
Last active December 17, 2023 22:28
Mimic Flow or LiveData of Android
import {LifecycleObserver, LifecycleOwner} from "./lifecycleowner";
interface Observer<T> {
onChange(value: T): void;
}
class SimpleObserver<T> implements Observer<T> {
constructor(private callback: (value: T) => void) {
}
@tuanchauict
tuanchauict / presentation-github-actions.txt
Created August 28, 2023 02:15
Created with MonoSketch
░██████╗░██╗████████╗██╗░░██╗██╗░░░██╗██████╗░    ░█████╗░░█████╗░████████╗██╗░█████╗░███╗░░██╗░██████╗
██╔════╝░██║╚══██╔══╝██║░░██║██║░░░██║██╔══██╗    ██╔══██╗██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║██╔════╝
██║░░██╗░██║░░░██║░░░███████║██║░░░██║██████╦╝    ███████║██║░░╚═╝░░░██║░░░██║██║░░██║██╔██╗██║╚█████╗░
██║░░╚██╗██║░░░██║░░░██╔══██║██║░░░██║██╔══██╗    ██╔══██║██║░░██╗░░░██║░░░██║██║░░██║██║╚████║░╚═══██╗
╚██████╔╝██║░░░██║░░░██║░░██║╚██████╔╝██████╦╝    ██║░░██║╚█████╔╝░░░██║░░░██║╚█████╔╝██║░╚███║██████╔╝
░╚═════╝░╚═╝░░░╚═╝░░░╚═╝░░╚═╝░╚═════╝░╚═════╝░    ╚═╝░░╚═╝░╚════╝░░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝╚═════╝░