Skip to content

Instantly share code, notes, and snippets.

View yunfan's full-sized avatar

yunfan yunfan

View GitHub Profile
@yunfan
yunfan / 浮动模块的生物制造方案.md
Created February 12, 2026 15:27
浮动模块的生物制造方案

生物钙源-菌丝矿化打印 (S-M-P) 方案技术白皮书

1. 方案愿景 (Vision)

本方案旨在利用海洋废弃物(贝壳、鱼骨)作为核心钙源,通过“平菇菌丝”构建生物骨架,结合“3D打印喷雾矿化”技术,在受控环境下实现海上漂浮模块的快速生长。


2. 原材料制备工艺 (Material Preparation)

2.1 活性生物钙液转化

@yunfan
yunfan / mux.py
Created June 27, 2025 06:34
a simple terminal multiplexer
import os
import subprocess
import select
import signal
import struct
import time
import fcntl
import termios
import sys
@yunfan
yunfan / bootstrap.sh
Created April 27, 2025 06:46
bootstrap an alpine on non-root user's home, and provide a script to use inside binary
#!/bin/sh
CWD=$(dirname $(realpath $0))
cd $CWD
TARGET_VER="3.21"
FULL_VER="${TARGET_VER}.3"
TARGET_DIR="${CWD}/sys"
TARGET_APK_REPO="mirrors.ustc.edu.cn"
import * as winston from 'winston';
import DailyRotateFile from 'winston-daily-rotate-file';
import { Config } from '../config';
class MyLogger {
logger: winston.Logger;
defaultLogLevel: string;
constructor(logger: winston.Logger, defaultLogLevel: string) {
this.logger = logger;
@yunfan
yunfan / inschecker.sh
Created September 5, 2018 08:27
a INS check
#!/bin/sh
## require objdump and awk and sed
fn=$1
objdump -j .text -S $fn | awk -F ' {2,}' '{print $3}' | sed -n '/^\s\+/!d;s/\s\+\([a-z]\+\).*$/\1/p' | sort | uniq -c | sort -k1 -n
## save here in case i would forget oneday
\ ssd1306 I2C display driver for 128x32 pixel OLED displays, this is work in progress
\ Tested with wemos oled shield
\ Usage:
\ display-init
\ font5x7 font !
\ 10 text-top ! 8 text-left !
\ "Hello" draw-str
\ display
\ display-clear
@yunfan
yunfan / gist:0da28c4677f9508fb3185e57e085299d
Created August 2, 2016 06:05
This is a modified version of bones7456's SimpleHTTPServer with upload, i add delete support
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
================================================
vi like interface for rappid
================================================
:Author: jyf
:Date: 2013-10-10
.. contents:: index
links