Skip to content

Instantly share code, notes, and snippets.

@jshen28
jshen28 / netlink_demo.c
Created May 21, 2022 23:23 — forked from supermartian/netlink_demo.c
Netlink programming demo.
@jshen28
jshen28 / build-swtpm.sh
Created July 2, 2023 02:06 — forked from Jacobboogiebear/build-swtpm.sh
A quick script to build swtpm and libtpm on Ubuntu 20.04 (created for WSL2 and WSLg)
sudo apt-get install git g++ gcc automake autoconf libtool make gcc libc-dev libssl-dev pkg-config libtasn1-6-dev libjson-glib-dev expect gawk socat libseccomp-dev -y
cd ~
git clone https://github.com/stefanberger/swtpm.git
git clone https://github.com/stefanberger/libtpms.git
cd libtpms
./autogen.sh --prefix=/usr --with-tpm2 --with-openssl
make
sudo make install
cd ../swtpm
./autogen.sh --prefix=/usr
@jshen28
jshen28 / list_examples.c
Created July 10, 2024 21:56 — forked from mathemandy/list_examples.c
examples on how to use the Linux Kernel list
#include "list.h"
#include "stdlib.h"
#include "stdio.h"
#include "stddef.h"
typedef struct component {
int id;
// This is used to link components together in their list
struct list_head list_node;
@jshen28
jshen28 / README.md
Created December 8, 2024 07:48 — forked from physacco/README.md
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@jshen28
jshen28 / cleanWater.js
Created January 13, 2025 10:29 — forked from yang10560/cleanWater.js
cleanWater
// ==UserScript==
// @name 百度文心一言去水印
// @namespace http://tampermonkey.net/
// @version 1.8
// @description 去文心一言水印、去星火水印。去天工水印。去chatGLM水印。去通义千问水印、去超时弹窗、去AI画图水印。CSDN-C知道去水印,去提问限制。
// @author 夜雨
// @match *://yiyan.baidu.com/*
// @match *://so.csdn.net/so/search*
// @match *://xinghuo.xfyun.cn/*
// @match *://neice.tiangong.cn/*