Skip to content

Instantly share code, notes, and snippets.

View binary4cat's full-sized avatar
🤑
I may be slow to respond.

cat binary4cat

🤑
I may be slow to respond.
View GitHub Profile
@binary4cat
binary4cat / stock_bkqd.json
Last active December 8, 2025 08:20
数据库
[{"date": "2025-11-10", "sectors": ["锂电池", "芯片", "ST板块", "酿酒", "化工", "福建", "并购重组", "食品饮料", "医药", "光伏"]}, {"date": "2025-11-11", "sectors": ["光伏", "锂电池", "机器人概念", "ST板块", "医药", "培育钻石", "地产链", "食品饮料", "金刚石概念", "化工"]}, {"date": "2025-11-12", "sectors": ["医药", "ST板块", "芯片", "锂电池", "天然气", "零售", "保险", "福建", "并购重组", "地产链"]}, {"date": "2025-11-13", "sectors": ["锂电池", "福建", "ST板块", "有色金属", "储能", "芯片", "医药", "地产链", "旅游", "化工"]}, {"date": "2025-11-14", "sectors": ["海峡两岸", "锂电池", "医药", "ST板块", "光伏", "天然气", "海南", "并购重组", "煤炭", "地产链"]}, {"date": "2025-11-17", "sectors": ["海峡两岸", "锂电池", "华为概念", "军工", "算力", "ST板块", "数字经济", "地产链", "并购重组", "农业"]}, {"date": "2025-11-18", "sectors": ["人工智能", "ST板块", "芯片", "实控人变更", "服装家纺", "并购重组", "新型工业化", "股权转让", "文创产品", "平台经济"]}, {"date": "2025-11-19", "sectors": ["农业", "化工", "海峡两岸", "海洋经济", "服装家纺", "军工", "芯片", "人工智能", "黄金", "ST板块"]}, {"date": "2025-11-20", "sectors": ["海峡两岸", "锂电池", "ST板块", "通信", "银行", "并购重组", "金融概念", "消费电子", "算力", "电源"]}, {"date": "2025-11-21", "sectors": ["人工智能", "海峡两岸", "地产
@binary4cat
binary4cat / xuangubao-dingpan.js
Created March 15, 2025 12:28
选股宝盯盘页面增强
// ==UserScript==
// @name 选股通盯盘增强
// @author binary4cat
// @namespace http://tampermonkey.net/
// @version 1.2
// @description 优化xuangutong.com.cn/dingpan页面体验
// @license Proprietary; All rights reserved. Redistribution or modification prohibited.
// @copyright 2025 binary4cat. Unauthorized copying or distribution is strictly forbidden.
// @match https://xuangutong.com.cn/dingpan
// @run-at document-end
@binary4cat
binary4cat / mwan3_interface.sh
Last active May 28, 2022 02:46
mwan3 interface auto restart
#!/bin/sh
mwan3 interfaces | awk '{if($4 != "online" && NR > 1) print $2}' | while read line; do
if [[ "$line" == "WAN" ]]; then
echo "------ eth1"
ip link set eth1 down
ip link set eth1 up
elif [[ "$line" == "WAN1" ]];then
echo "---- veth11"
ip link set veth11 down
@binary4cat
binary4cat / compress.go
Created January 14, 2022 07:42 — forked from bussiere/compress.go
compress uncompress a string in golang
package main
import (
"bytes"
"compress/gzip"
"fmt"
"encoding/base64"
"io/ioutil"
)
--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
@binary4cat
binary4cat / Howto_Zsh5-6-2_Centos7.md
Created March 31, 2021 07:14 — forked from Semo/Howto_Zsh5-6-2_Centos7.md
How to install Zsh version 5.6.2 into CentOS 7

How to install Zsh version 5.6.2 into CentOS 7

Given that you have a clean installation of CentOS 7 which was already updated, by you, then you still have some dependencies to install make and install the external Zsh from the source. You must be root to get the stuff done.

Install GCC Development Tools

yum groupinstall "Development tools"

Check if it's working

@binary4cat
binary4cat / sse.go
Created April 7, 2020 06:59 — forked from ismasan/sse.go
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@binary4cat
binary4cat / use_fingerprint2.js
Created March 25, 2020 02:12
fingerprint2 demo
<script src="https://cdn.staticfile.org/fingerprintjs2/2.1.0/fingerprint2.min.js"></script>
<script>
function start() {
const start = new Date().getTime();
let view = document.querySelector('#view');
view.innerHTML = '';
let excludes = {};
if (!document.querySelector('#userAgent').checked) {
excludes.userAgent = true;
}
@binary4cat
binary4cat / DictionaryExtend.cs
Created January 31, 2019 09:00
c# Dictionary 相关扩展
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
namespace iCTR.WeiXin.Common.Extensions
{
/// <summary>
/// 字典类扩展
/// </summary>
public static class DictionaryExtend
@binary4cat
binary4cat / System.Dynamic.ExpandoObject_create.cs
Last active January 29, 2019 01:30
动态创建c#类,以及在Csvhelper中创建动态的数据对象
// my pretend dataset
List<string> fields = new List<string>();
// my 'columns'
fields.Add("this_thing");
fields.Add("that_thing");
fields.Add("the_other");
dynamic exo = new System.Dynamic.ExpandoObject();
foreach (string field in fields)