Skip to content

Instantly share code, notes, and snippets.

View gnuos's full-sized avatar

Kevin gnuos

View GitHub Profile
@gnuos
gnuos / opencode-evolution-roadmap.md
Last active March 23, 2026 18:51
OpenCode CLI Self-Improvement

OpenCode CLI Agent 自主进化完整路线图

版本: v1.0
适用对象: OpenCode CLI 用户
目标: 构建具备自我反思、自我修正、自我扩展能力的智能Agent系统
预计周期: 8-12周(可根据实际情况调整)


目录

@gnuos
gnuos / Makefile
Created March 19, 2026 08:45
Makefile for golang project
# =============================================================================
# Variables
# =============================================================================
# Application name
APP := jop
# Package paths
MAIN_DIR := cmd/jop
@gnuos
gnuos / main.go
Last active December 13, 2025 11:10
Run a command in background
package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"log"
"net"
@gnuos
gnuos / config.fish
Created December 9, 2025 17:54
fish shell config
## Set values
# Hide welcome message & ensure we are reporting fish as shell
set fish_greeting
set VIRTUAL_ENV_DISABLE_PROMPT 1
set -xU MANPAGER "sh -c 'col -bx | bat -l man -p'"
set -xU MANROFFOPT -c
set -x SHELL /usr/bin/fish
## Export variable need for qt-theme
if type qtile >>/dev/null 2>&1
@gnuos
gnuos / ipv4_ipv6_doh_doq.md
Created October 2, 2025 08:24 — forked from leiless/ipv4_ipv6_doh_doq.md
List of direct IPv4/IPv6 DoH/DoQ

dns.google / 8888.google

8.8.4.4
8.8.8.8
2001:4860:4860:0:0:0:0:64
2001:4860:4860:0:0:0:0:6464
2001:4860:4860:0:0:0:0:8844
2001:4860:4860:0:0:0:0:8888
#!/usr/bin/env python
# -*- coding: utf8 -*-
import atexit
import os
import sys
import time
from signal import SIGINT, SIGTERM
@gnuos
gnuos / parser.go
Created November 10, 2024 09:33
一个用于把YAML描述文件解析成Go语言代码的示例
// 代码用Go语言的反射示范了把YAML文件里面的字段抽取之后拼接打到控制台的实现方法
package main
import (
"fmt"
"log"
"os"
"strings"
@gnuos
gnuos / musl-toolchain.sh
Last active August 30, 2024 18:20
musl-libc cross toolchain bootstrap scripts
#!/bin/bash
#
# 原项目地址:https://github.com/michaeljclark/musl-riscv-toolchain
#
# ## musl-toolchain
#
# musl-libc GCC cross compiler toolchain bootstrap script
#
# Usage: ./musl-toolchain <arch> [gcc version] [linux version] [fast|all]
#
@gnuos
gnuos / t.py
Created September 14, 2023 01:52
Enumerate all possible RSA plaintexts given a ciphertext, two primes p and q, and any integer e.
from Crypto.Util.number import GCD, bytes_to_long, long_to_bytes
class CRT:
def __init__(self, p, q):
self.p_p_inv = p * pow(p,-1,q)
self.p_q = p * q
def calc(self, a, b):
x = a + (b - a) * self.p_p_inv
return x % self.p_q
@gnuos
gnuos / musl-bootstrap.sh
Created September 13, 2023 21:15
musl-bootstrap.sh
#!/bin/bash
# This script builds a (hopefully) working gcc based cross compiler
# Update to latest stable release
BINUTILS_VERSION=2.27
GMP_VERSION=6.1.2
MPFR_VERSION=3.1.5
MPC_VERSION=1.0.3
ISL_VERSION=0.16.1
GCC_VERSION=6.3.0