Skip to content

Instantly share code, notes, and snippets.

@zenglian
zenglian / gist:2ed7188f501daacf7c1a316fc306da77
Last active July 8, 2026 08:13
快速拉黑东方财富评论区用户的油猴脚本
// ==UserScript==
// @name 东方财富股吧一键拉黑(发言者+点赞者)
// @namespace https://guba.eastmoney.com/
// @version 1.5
// @description 在东方财富股吧评论区为每条评论的发言者添加"拉黑"按钮,调用官方拉黑API;支持批量拉黑本页所有发言者、自动隐藏已拉黑用户的评论、点赞者拦截增强、黑名单管理面板。
// @author You
// @match *://guba.eastmoney.com/*
// @match *://gubaf10.eastmoney.com/*
// @icon https://gbfek.dfcfw.com/project/guba2022/img/favicon.ico
// @grant GM_xmlhttpRequest
@zenglian
zenglian / layout-en.md
Last active August 30, 2018 05:45
Optimize Keyboard Layout for Developers

Optimize Keyboard Layout for Developers

Design

For most people, " is much more frequently used than '.
For most developers,Esc is much more frequently used than Caps Lock.
For programmers of Java/JavaScript/C/C++/C# etc, {/} is more frequently used than [/].

So it's not bad to swap them.

Configuration

@zenglian
zenglian / layout.md
Last active February 18, 2021 14:10
程序员的键盘布局优化方案与配置

程序员的键盘布局优化

问题

据粗略统计:

  • 对于绝大部分人,"的使用频率大于'
  • 对于开发人员,Esc键的使用频率大于Caps Lock键。
  • 对于Java系/JavaScript系/C系/C#/Go等程序员,{/}的使用频率要明显大于[/]

解决方案

交换以上键3组按键。

@zenglian
zenglian / log4j-socket-server-separate-files.md
Last active August 19, 2018 09:48
log4j socket server: save log events from different clients to separate files

log4j socket server: save log events from each client to a separate file

Issue

An application can run on multiple hosts and if we want to collect the logs from all clients we can use log4j's socket appender.

Log4j has implemented SimpleSocketServer which calls SocketNode which collects all events from all clients to a single log file so it's difficult to identify them.

Goal

Out goal is to collect events from each client to a separate log file with file name xxx-{client}.log where {client} is the client address.