Skip to content

Instantly share code, notes, and snippets.

View Jamlee's full-sized avatar
🐛
Focusing

JamLee Jamlee

🐛
Focusing
View GitHub Profile
@Jamlee
Jamlee / cscope_maps.vim
Created April 2, 2024 03:09 — forked from cyeong/cscope_maps.vim
enable cscope shortcuts and functions in vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CSCOPE settings for vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" This file contains some boilerplate settings for vim's cscope interface,
" plus some keyboard mappings that I've found useful.
"
" USAGE:
" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a
" 'plugin' directory in some other directory that is in your
@Jamlee
Jamlee / busybox.md
Last active June 24, 2025 13:48
使用 busybox 制作内存文件系统 initramfs
  1. 下载解压 busybox 并配置环境变量

    wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2
    tar -xf busybox-1.36.1.tar.bz2
    cd busybox-1.36.1
    # 配置环境变量
    export ARCH=arm64
    export CROSS_COMPILE=aarch64-linux-gnu-
@Jamlee
Jamlee / cgo_manual_compile.sh
Last active July 3, 2025 15:03
This script manually compiles a Go program with CGO (Go-C interoperability) by replicating the internal steps of the Go toolchain. It handles CGO preprocessing, compiles generated C files with Clang, links C objects, generates import stubs for Go-C bindings, compiles Go code, and finally links all components into an executable. Designed for debu…
#!/bin/bash
# @author: jamlee
# date: 20250703
# platform: mac pro m3
# 设置工作目录(模拟原始流程中的$WORK/b001)
rm -fr tmp
mkdir tmp
WORK_DIR=$(pwd)/tmp