Skip to content

Instantly share code, notes, and snippets.

View hexiyou's full-sized avatar

He Xiyou hexiyou

View GitHub Profile
@hexiyou
hexiyou / winguake.ahk
Created October 13, 2025 17:19 — forked from salmonax/winguake.ahk
A simple Autohotkey script for running Mintty in Windows like GNOME Guake
MinttyPath := "C:\cygwin64\bin\mintty.exe"
f12::
if (!WinActive("ahk_class mintty"))
{
WinGet, active_id, ID, A
}
ConsoleHandler(active_id)
return
@hexiyou
hexiyou / HTMLClipboard.py
Created October 10, 2025 17:18 — forked from Erreinion/HTMLClipboard.py
HTMLClipboard with updates for Python 3. Includes exception handling for locked clipboard. Improvement of: http://code.activestate.com/recipes/474121/
"""
Created on Sep 24, 2013
@author: RandomHardcoreJerks
Requires pywin32
original: http://code.activestate.com/recipes/474121/
# HtmlClipboard
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ
@hexiyou
hexiyou / 1
Created May 16, 2025 09:38 — forked from noodles-v6/1
Perl中文匹配
!/usr/bin/perl
use strict;
use warnings;
use utf8;
use open ":encoding(utf8)",":std";
open my $infh, "<:encoding(utf8)", "zh.dat" or die $!;
while (<$infh>) {
@hexiyou
hexiyou / longest_chinese_tokens_gpt4o.py
Created April 28, 2025 09:34 — forked from ctlllll/longest_chinese_tokens_gpt4o.py
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@hexiyou
hexiyou / douyin.js
Created April 24, 2025 19:04 — forked from brainbush/douyin.js
抖音直播地址解析
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const { pathname } = new URL(request.url);
@hexiyou
hexiyou / ssh-snippets.md
Created January 11, 2025 14:04 — forked from real-jiakai/ssh-snippets.md
ssh工具代码脚本片段

1、debian、ubuntu更新并升级软件包

apt update && apt upgrade -y

2、docker compose重新部署

docker compose down && docker compose up -d
@hexiyou
hexiyou / inspect_https-tls-ssl_certs.md
Created November 25, 2024 09:49 — forked from stonehippo/inspect_https-tls-ssl_certs.md
A couple of ways to look at web server HTTPS/TLS/SSL certificate data via the command line

Inspecting HTTPS (TLS, SSL) certificates from the command line

I needed to inspect an HTTPS site's current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well.

With nmap

nmap -p 443 --script ssl-cert [hostname]
from base64 import b64encode, b64decode
from hashlib import md5
from phpserialize import namespace, serialize
from requests import session
ses = session()
'''
Arbitrary file write on think php 5.0.24
implemented by Frank