Skip to content

Instantly share code, notes, and snippets.

View xiaozhouzhoua's full-sized avatar
🎯
Focusing

dawenxi xiaozhouzhoua

🎯
Focusing
View GitHub Profile
✅ Inject it and use it:
...
@Autowired
TaskScheduler scheduler;
scheduler.schedule(
() -> System.out.println("Hello!"),
new CronTrigger("0 */5 * * * *") // every 5 min
);
@freepicheep
freepicheep / config.jsonc
Created December 16, 2025 17:23
freepicheep's fastfetch config
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"padding": {
"top": 5,
"right": 6
}
},
"modules": [
"break",
@wey-gu
wey-gu / omarchy-chinese-simplified-input-config.md
Created September 28, 2025 14:17
Omarchy Chinese Simplified Input Config
sudo pacman -S fcitx5 fcitx5-configtool fcitx5-gtk fcitx5-qt fcitx5-rime

# edit /etc/security/pam_env.conf
# add:

# FCITX input-related
GLFW_IM_MODULE          DEFAULT=fcitx
INPUT_METHOD DEFAULT=fcitx
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@lewangdev
lewangdev / install-docker-ce-aliyun-debian.md
Last active October 13, 2026 16:46
在阿里云中国大陆机房的Debian系统上安装Docker服务和拉取dockerhub镜像

安装 docker-ce

# https://developer.aliyun.com/article/110806
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
@samsch
samsch / stop-using-jwts.md
Last active October 23, 2026 14:44
Stop using JWTs

Stop using JWTs!

TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.

If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)

A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/

The reason to avoid JWTs comes down to a couple different points:

  • The JWT specification is specifically designed only for very short-live tokens (~5 minute or less). Sessions
@wojteklu
wojteklu / clean_code.md
Last active November 5, 2026 02:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active October 31, 2026 15:47
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@guweigang
guweigang / git_toturial
Last active November 1, 2026 13:26
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@rxaviers
rxaviers / gist:7360908
Last active November 3, 2026 20:38
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: