Skip to content

Instantly share code, notes, and snippets.

View Theigrams's full-sized avatar

Jin Zhang Theigrams

View GitHub Profile
@Theigrams
Theigrams / Logseq.css
Last active June 24, 2022 15:21
A Logseq custom CSS
:root {
--ls-font-family: "Iowan Old Style", serif, "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 16px;
}
a.external-link {
color: #e0491f;
border-bottom: 1px dotted #bbb;
}
@Theigrams
Theigrams / latex.hsnips
Created November 12, 2023 07:31
LaTeX HyperSnips
global
// JavaScript code
function gen_matrix(nrow, ncol) {
let results = "";
let order = 1;
for (var i=0; i < nrow; i++){
results += ' ';
for(var j = 0; j < ncol - 1; j++){
results += "$" + (order).toString() + " & ";
order ++;
@Theigrams
Theigrams / clash_api.py
Created November 18, 2023 16:04
Clash API controlled through Python
import json
import requests
class ClashAPI:
def __init__(self, base_url, secret):
self.base_url = base_url
self.secret = secret
self.headers = {
@Theigrams
Theigrams / .zshrc
Last active December 3, 2023 20:09
Zshrc Configuration File
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@Theigrams
Theigrams / js2md.py
Last active February 12, 2025 05:40
将 DeepResearch Json 转成 markdown
import json
import re
from dataclasses import dataclass
from datetime import datetime
from typing import Dict, List, Optional
from urllib.parse import urlparse, urlunparse
@dataclass
class ContentReference: