Skip to content

Instantly share code, notes, and snippets.

View jiacai2050's full-sized avatar
:shipit:

Jiacai Liu jiacai2050

:shipit:
View GitHub Profile

1. Introduction (Highlighting Leadership)

I am Jiacai Liu (@jiacai2050), a core maintainer and contributor deeply embedded in the Zig and Systems Programming ecosystems. My work spans from building high-performance databases to curating the foundational learning resources for the Zig language.

2. Key Open Source Impact

My contribution to the open-source community is focused on three pillars:

  • Community Infrastructure (ZigCC): As a core maintainer of the zigcc organization, I lead the curation of Awesome Zig and the development of Zig Cookbook. These are the primary entry points for developers worldwide to discover libraries and learn best practices for the Zig programming language.
@jiacai2050
jiacai2050 / bash_aliases
Last active February 18, 2026 11:21
bashrc for ubuntu
export PATH=$PATH:~/bin:~/.asdf/shims
export PS1="\n[\u@\H] \t \w \n\${all_proxy}\$(__git_ps1)$ "
alias ls='ls -FG'
alias ll='ls -lh'
alias lla='ls -lah'
alias cd.='cd ..'
alias cd..='cd ../..'
alias cd...='cd ../../..'
alias cd....='cd ../../../..'
@jiacai2050
jiacai2050 / git-patch.sh
Created February 9, 2026 09:56
基于当前的修改(staged/unstaged)生成 patch 文件
#!/usr/bin/env bash
set -Eeuo pipefail
# 获取当前分支和时间
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
INCLUDE_UNSTAGED=false
# 处理输入参数
@jiacai2050
jiacai2050 / cpp-example.md
Last active January 30, 2026 01:02
C/C++ history

C++各版本核心特性快速使用指南(附极简示例)

结合C++演进路径,聚焦各版本最实用、工业界高频使用的核心特性,每个特性配可直接运行的极简示例,兼顾语法理解和快速上手,从基础到现代C++逐步推进,适配开发实践需求。

一、探索期(C with Classes/Early C++):C++基础核心(1980-1985)

这一阶段的特性是C++的底层基础,后续所有版本均完全兼容,是入门和开发的必备核心,无编译器版本限制。

1. 类(class)+ 封装 + 构造/析构函数(C with Classes 1980)

核心作用:C++面向对象的基础,将数据和操作数据的函数封装为一个整体,解决C语言无面向对象能力的问题。 示例

#include 
@jiacai2050
jiacai2050 / rocksdb-demo.zig
Created January 17, 2025 02:41
Use rocksdb in Zig!
const std = @import("std");
pub const c = @cImport({
@cInclude("rocksdb/c.h");
});
const key = "hello";
const value = "world";
pub fn main() !void {
const opts = c.rocksdb_options_create();
@jiacai2050
jiacai2050 / ruts_meetup_[1].md
Created December 12, 2024 23:56 — forked from humb1t/ruts_meetup_[1].md
Rust Users Team Samara Meetup

Rust User Team Samara - &Meetup[1]

How to and why you need to learn Rust

Rust learning curve

  • Evolution
  • Competition
  • Are you insane? Rust is awesome!!!
@jiacai2050
jiacai2050 / macOS Internals.md
Created December 1, 2024 14:58 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

const std = @import("std");
const BIND_HOST: []const u8 = "0.0.0.0";
const BIND_PORT: u16 = 8090;
const NUM_WORKER_THREADS: u32 = 16;
const DOWNLOAD_DIR: []const u8 = "/tmp";
const MAX_FILE_SIZE: usize = 1024 * 1024 * 500; // 500M
// const UPSTREAM_URL: []const u8 = "https://fs.liujiacai.net/zigbuilds";
const UPSTREAM_URL: []const u8 = "https://ziglang.org";
wget 'https://github.com/google/flatbuffers/archive/refs/tags/v24.3.25.tar.gz'
tar xzf flatbuffers-24.3.25.tar.gz
pushd flatbuffers-24.3.25
cmake -G "Unix Makefiles"
make
make install
ldconfig
flatc --version
rm -rf flatbuffers-24.3.25
@jiacai2050
jiacai2050 / docker-registry-mirrors.md
Created March 7, 2024 13:56 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+