Skip to content

Instantly share code, notes, and snippets.

View yanickxia's full-sized avatar
:octocat:
Play with Rust

Yanick.xia yanickxia

:octocat:
Play with Rust
View GitHub Profile
@yanickxia
yanickxia / privacy-policy.md
Created November 27, 2026 02:30
TabRoost 栖页 隐私政策 · Privacy Policy

TabRoost 栖页 隐私政策

生效日期:2026-11-27 · 适用版本:TabRoost 浏览器扩展 0.8.4 及之后的版本

概要(English summary)

TabRoost is a tab and window manager. It reads the titles, URLs, pinned state and tab-group membership of the browser tabs you save into a "space", together with the notes, tasks and links you add to that space. This data is stored locally in your browser. Nothing is sent to the developer: TabRoost has no backend of its own. If you choose to connect a sync server that you (or your organization) host yourself, your spaces, your account email and a device identifier are transmitted to that server over HTTPS. If you choose to configure an AI endpoint, tab titles and URLs (without query parameters or fragments) are sent to that endpoint only when you click an AI button. There are no ads, analytics or trackers.

我们处理哪些数据

@yanickxia
yanickxia / ss-net-tuning.md
Created October 7, 2026 11:51
高丢包长肥链路上的代理网络调优实战:BBR、Docker 网络陷阱与 shadowsocks-rust 实测(58KB/s → 5MB/s)

高丢包长肥链路上的代理网络调优实战

一次 shadowsocks-rust 部署实录:从 58 KB/s 调到 5 MB/s(~80 倍)。适用于跨境/高 RTT/有丢包的链路,其他代理(xray 等)同理。

核心结论:加密算法几乎无关紧要,拥塞控制和 socket 缓冲才是大头;而 Docker 的网络栈会偷偷吃掉你 80 倍性能。

TL;DR — 按收益排序

优先级 手段 实测收益 层面
@yanickxia
yanickxia / addTypeInformationToObject.go
Created November 22, 2020 12:12
k8s-addTypeInformationToObject
// addTypeInformationToObject adds TypeMeta information to a runtime.Object based upon the loaded scheme.Scheme
// inspired by: https://github.com/kubernetes/cli-runtime/blob/v0.19.2/pkg/printers/typesetter.go#L41
func addTypeInformationToObject(obj runtime.Object) error {
gvks, _, err := scheme.Scheme.ObjectKinds(obj)
if err != nil {
return fmt.Errorf("missing apiVersion or kind and cannot assign it; %w", err)
}
for _, gvk := range gvks {
if len(gvk.Kind) == 0 {
@yanickxia
yanickxia / anync.rs
Created September 4, 2020 10:05
Rust Async
#![allow(unused)]
use {
futures::{
future::{BoxFuture, FutureExt},
task::{ArcWake, waker_ref},
},
std::{
future::Future,
pin::Pin,
@yanickxia
yanickxia / toggl-tomator.js
Last active July 17, 2020 13:24
toggl-tomator
// ==UserScript==
// @name add tomator timer for toggle
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author yanick
// @match toggl.com/*
// @match app.clickup.com/*
// @grant GM_addStyle
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
@yanickxia
yanickxia / bfs.java
Created April 9, 2018 07:11
BFS & DFS
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
public class TreeSearch {
public static void depthFirstSearchWithStack(int[][] adjMatrix) {
boolean[] visitors = new boolean[adjMatrix.length];
Stack<Integer> stack = new Stack<>();
@yanickxia
yanickxia / docker-compose.yml
Created January 9, 2018 15:14
gitlab-dockercompse
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://git.mschina.io'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = 'smtp.mailgun.org'
gitlab_rails['smtp_port'] = 587
@yanickxia
yanickxia / Final_Method_In_Abstart_Class.java
Created December 9, 2015 02:31
Final_Method_In_Abstart_Class
public abstract class BaseLoaneeRepayment implements Repayment {
@Autowired
protected LoanRepository loanRepository;
@Transactional(propagation = Propagation.REQUIRES_NEW)
public final void repay(RepaymentInfo repaymentInfo) {
Loan loan = loanRepository.lockAndLoad(repaymentInfo.getLoan().id());
}
protected abstract void preCheck(final RepaymentInfo repaymentInfo);