Skip to content

Instantly share code, notes, and snippets.

View chadluo's full-sized avatar
🟢
pls gib green

Chad Luo chadluo

🟢
pls gib green
View GitHub Profile
@chadluo
chadluo / zzz_disk_stats.md
Last active April 6, 2026 11:54
Zenless Zone Zero disk set keep or trash

ZZZ Disk Drive Build Guide — Drive Set Analysis

Derived from prydwen.gg build guides for Apex and Meta tier agents. Use this as a reference when deciding which disk drives to keep in your inventory.


Astral Voice

Used by (8 agents): Apex: Astra Yao, Ukinami Yuzuha | Meta: Evelyn, Orphie And Magus, Lighter, Nicole Demara, Trigger, Zhao

@chadluo
chadluo / shadows_shouldnt_stack.md
Last active April 6, 2026 11:54
shadows shouldn't stack

In computer UI shadows are typically implemented as a darken shape with blurred or half transparent edge. It's intiutive to add such shadows to every element, but when elements stack so do the shadows and they can get too dark.

Single window single shadow Many windows many shadows stacked
single - normal shadow multi - too much shadow

Shadows indicate absence of direct light, and if a material is not transparent, stacking it won't make it block even more light and make what's below it even darker.

You might take the union of all elements and apply a unified shadow, but still need to handle the 'element on element' shadow. 3DCG rendering pipelines should have mature solutions, and ray tracing should be even better, but they could be too expensive for such plain UIs.

@chadluo
chadluo / manage_chrome_tabs.md
Last active April 6, 2026 12:05
Manage Chrome tabs, a methodology

Main idea: one window for one project.

A window can be explicitly named to help identify the project, right click on the tab bar or select top right menu > More Tools > Name Window.... Use certain symbols or formats to differ manually renamed windows from page original tabs.

The name isn't directly visible but will be shown in different scenarios:

  • on Mac, using Mission Control or App Exposé
  • on Windows, on taskbar or switch windows using Alt-Tab

When create new tabs, consider moving them to a more proper window. Either by dragging or right click on the tab and choose Move Tab to Another Window.

@chadluo
chadluo / Web dev explained.md
Last active May 7, 2024 15:07
An oversimplified idea behind web development and tooling etc., like how did it come here

I remembered reading an article like this years ago but couldn't find it any more. I'd rather rewrite one myself.

Browsers

The term "Web" in most contexts refer to stuff happening in the browser or on the browser tech stack, for example when comparing different implementations of an app (platform native, containerized/VM or in a browser). Web apps can reach cross-platform easier than other tech stacks as most devices will have a browser, but they fall behind in performance and system API availability.

Browsers send requests to servers and receive text based HTML code represented various elements -- text, blocks, links to external resources like images & videos -- to render onto the viewport.

HTML supports semantic elements (bullet point lists, tables etc.) and basic styling (for example fgColor and bgColor), but people want better control and performance, so [CSS

@chadluo
chadluo / userscript.js
Last active November 16, 2022 06:48
Bitbucket Pull Request Comment Watch or something
// ==UserScript==
// @name Pull Request Comment Watch or something
// @namespace Violentmonkey Scripts
// @match https://bitbucket.org/*/pull-requests/*
// @version 1.0
// @author https://gist.github.com/chadluo
// @icon https://www.google.com/s2/favicons?domain=bitbucket.org
// @grant GM_addStyle
// ==/UserScript==
@chadluo
chadluo / userscript.js
Created August 31, 2021 06:19
Google search get favicon and hide http/https
// ==UserScript==
// @name Google search favicon
// @namespace http://tampermonkey.net/
// @author chadluo
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==
'use strict';
@chadluo
chadluo / bitbucket-PR-syntax-highlight.js
Last active September 9, 2022 03:41
Bitbucket PR syntax highlight (actually just hljs wrapper but whatever)
// ==UserScript==
// @name Bitbucket PR syntax highlight (actually just a HLJS wrapper)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description use HLJS to syntax highlight Bitbucket PR. see https://highlightjs.org/usage/
// @author Chad
// @match https://bitbucket.org/*/pull-requests/*
// @icon https://www.google.com/s2/favicons?domain=bitbucket.org
// @grant GM_addStyle
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js
@chadluo
chadluo / timestamps.md
Last active February 16, 2021 02:52
On timestamp formats

On timestamp formats

Scope

Timestamp: the instant when an event happened (or will happen), be it a server log, a comment, a commit, an email, start/end of CI build, publish time/last edited time of a video/blog post etc. Should not be long lasting events.

User: the people who refer to the timestamp to find when the event happened. The event may or may not be created by the user.

@chadluo
chadluo / README.md
Created August 17, 2020 07:05
Build easy_rust to PDF with Pandoc

easy_rust

Basic steps

  1. install texlive-full
  2. replace bare \n, \t with \n, \t
  3. $ pandoc -o easy_rust.pdf --pdf-engine=xelatex --metadata pagetitle="Easy Rust" README.md
@chadluo
chadluo / makefile
Last active December 12, 2023 05:05
resume template & builder
# usage:
# $ make
john_doe.pdf: resume.md
pandoc -o john_doe.pdf resume.md
resume.md:
sudo apt update
sudo apt install pandoc texlive-base texlive-latex-extra
echo "$$SAMPLE_MD" > resume.md