Skip to content

Instantly share code, notes, and snippets.

View craftslab's full-sized avatar
:octocat:
Focusing

Jia craftslab

:octocat:
Focusing
View GitHub Profile
@craftslab
craftslab / CMakeLists.txt
Last active June 4, 2025 09:33
go binding
cmake_minimum_required(VERSION 3.16)
project(CppGoExample)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Go library configuration
set(GO_SOURCE_DIR "${CMAKE_SOURCE_DIR}/go")
set(GO_OUTPUT_DIR "${CMAKE_BINARY_DIR}/go")
set(GO_LIB_NAME "golib")
@craftslab
craftslab / README.md
Last active June 4, 2025 02:52
go environ

go environ

go run main.go
@craftslab
craftslab / README.md
Last active April 28, 2025 21:08
jekyll install

Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install -y ruby-full build-essential zlib1g-dev

Set environment

@craftslab
craftslab / Dockerfile
Last active April 27, 2025 08:32
mcpm deploy
FROM ubuntu:22.04
USER root
ENV DEBIAN_FRONTEND=noninteractive
ENV TIME_ZONE=Asia/Shanghai
RUN apt update -y && \
apt install -y apt-transport-https ca-certificates curl && \
apt install -y inetutils-ping net-tools openssh-server perl telnet tzdata vim && \
ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone && \
echo "dash dash/sh boolean false" | debconf-set-selections && \
@craftslab
craftslab / README.md
Last active May 18, 2025 03:11
uv install

Install

pip install hatch
hatch new lintx

curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv .venv --python=3.13
source .venv/bin/activate
@craftslab
craftslab / README.md
Last active April 24, 2025 04:35
mcp deploy

Install toolchains

Set variables

  • Set env on windows for npm and uv
@craftslab
craftslab / README.md
Last active April 7, 2025 07:04
litellm deploy

litellm deploy

Clone

git clone https://github.com/BerriAI/litellm.git

Deploy

@craftslab
craftslab / README.md
Last active March 25, 2025 03:59
ldap deploy

ldap deploy

Install

sudo apt update
sudo apt install -y slapd ldap-utils

Configure

@craftslab
craftslab / README.md
Last active April 23, 2025 21:16
dify deploy

dify deploy

Clone

git clone https://github.com/langgenius/dify.git

Deploy

@craftslab
craftslab / README.md
Last active March 21, 2025 07:33
openai fake

openai fake

Run

# http://localhost:9090/v1/chat/completions
# http://localhost:9090/v1/completions
# http://localhost:9090/v1/models

pip install -r requirements.txt