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 / README.md
Last active March 10, 2026 06:00
openclaw docker

openclaw docker

Setting

Clone

git clone https://github.com/openclaw/openclaw.git
@craftslab
craftslab / README.md
Last active February 28, 2026 13:59
openclaw chrome

openclaw chrome

Install

curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install

sudo apt-get update
@craftslab
craftslab / README.md
Created February 19, 2026 06:20
ssh tunneling

SSH Tunneling on Windows WSL2 for Both Web and Git

This guide uses one SSH SOCKS tunnel for both:

  • Browsing websites like https://github.com
  • Pushing Git over HTTPS, e.g. https://github.com/codex-router/codex.gerrit.git

1) Start SSH SOCKS tunnel in WSL2

Open WSL terminal and run:

@craftslab
craftslab / README.md
Created February 19, 2026 06:12
ubuntu vnc

Ubuntu 24.04 GUI over VNC

This guide installs a desktop GUI on Ubuntu 24.04 and exposes it through VNC. Use XFCE for a lightweight setup, or GNOME for a full Ubuntu desktop.

1) Install desktop + VNC server

# Option A (lightweight): XFCE
sudo apt update
@craftslab
craftslab / wsl-sshpass.bat
Created February 16, 2026 07:44
wls sshpass
@echo off
REM Test: wsl -e script -q -c "sshpass -p '...' ssh -t -o ... user@host"
REM Set TEST_SSH_* and optionally WSL_DISTRO. Run "wsl -l -v" to see distro names.
if "%TEST_SSH_USER%"=="" set TEST_SSH_USER=your_name
if "%TEST_SSH_HOST%"=="" set TEST_SSH_HOST=your_host
if "%TEST_SSH_PORT%"=="" set TEST_SSH_PORT=22
if "%TEST_SSH_PASSWORD%"=="" set TEST_SSH_PASSWORD=your_password
REM Use the distro where sshpass is installed (e.g. Ubuntu-24.04). Default = Ubuntu.
@craftslab
craftslab / microgpt.py
Created February 13, 2026 01:30 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@craftslab
craftslab / README.md
Last active September 11, 2025 00:25
nfs config

nfs config

Prerequisites

  • CentOS 8 under WSL2
  • Disable Docker Desktop

Set wsl

@craftslab
craftslab / README.md
Last active October 15, 2025 07:41
centos settings

centos settings

Pull image

docker pull quay.io/centos/centos:8
docker create --name centos-8 quay.io/centos/centos:8
docker export centos-8 -o centos-8.tar
docker rm centos-8
@craftslab
craftslab / README.md
Last active August 29, 2025 07:52
openai-agents mcp

openai-agents mcp

Run

python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt
npm install -g @modelcontextprotocol/server-filesystem
@craftslab
craftslab / README.md
Last active July 23, 2025 02:35
langfuse prompt

langfuse prompt

pip install langfuse
python main.py

Reference