Skip to content

Instantly share code, notes, and snippets.

@ivershuo
ivershuo / main.go
Created March 10, 2023 17:57
一个chatbash
package main
import (
"context"
"fmt"
"os"
"os/exec"
"regexp"
"strings"

Keybase proof

I hereby claim:

  • I am ivershuo on github.
  • I am ivershuo (https://keybase.io/ivershuo) on keybase.
  • I have a public key whose fingerprint is 9E50 1AC8 5FFA C895 3CF3 AF22 A28F 8BF1 C05F 367A

To claim this, I am signing this object:

@ivershuo
ivershuo / readerview_sdk.js
Last active July 7, 2021 09:43
ReaderView SDK
(function(){
"use strict";
/*Reader View插件id*/
const RV_EXT_ID = 'iibolhpkjjmoepndefdmdlmbpfhlgjpl';
const MSG_PRE = 'ReaderView.';
/**
* 插件与插件间、插件与插件页面脚本间数据通信
/*
* Copyright (c) 2010 Apple Inc. All rights reserved.
*/
function characterNeedsScoreMultiplier(e) {
if (!e || e.length === 0)
return !1;
var t = e.charCodeAt(0);
return t > 11904 && t < 12031?!0 : t > 12352 && t < 12543?!0 : t > 12736 && t < 19903?!0 : t > 19968 && t < 40959?!0 : t > 44032 && t < 55215?!0 : t > 63744 && t < 64255?!0 : t > 65072 && t < 65103?!0 : t > 131072 && t < 173791?!0 : t > 194560 && t < 195103?!0 : !1
}
function domDistance(e, t, n) {
@ivershuo
ivershuo / node_fcgi.js
Last active March 9, 2016 05:52
FastCGI server for Node.js
var net = require('net'),
querystring = require('querystring');
var TYPES = {
FCGI_BEGIN_REQUEST : 1,
FCGI_ABORT_REQUEST : 2,
FCGI_END_REQUEST : 3,
FCGI_PARAMS : 4,
FCGI_STDIN : 5,
FCGI_STDOUT : 6,