Skip to content

Instantly share code, notes, and snippets.

View KevinZonda's full-sized avatar
🐞
Code once, bug everywhere

Xiang Shi KevinZonda

🐞
Code once, bug everywhere
View GitHub Profile
@KevinZonda
KevinZonda / chatglm-openai-api.ipynb
Created April 21, 2023 05:26 — forked from ninehills/chatglm-openai-api.ipynb
chatglm-openai-api.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ninehills
ninehills / chatglm-openai-api.ipynb
Last active April 16, 2024 01:15
chatglm-openai-api.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@miyouzi
miyouzi / nginx_with_socat.md
Last active October 26, 2024 22:03
配置 Nginx 通过代理访问反代目标(B站代理解析)

简介

众所周知,有些服务存在着地区限制,我们可以通过在服务所属地区搭建代理服务来解决,其中在其服务范围内部署 Nginx 反代服务是个有效且流行的办法。

但如果区域很多,每个区域都布置一台服务器那成本会有些高昂且利用率很低,通常我们只是需要该地区的 IP 而已,如果手头上正好有这些地区的代理池的话,那我们就可以只用一台服务器部署Nginx反向代理结合服务所在地区的代理实现相同的效果。

本文着重介绍的就是如何让 Nginx 通过代理访问上游服务。(即 proxy_pass 的目标)

详细图文说明可以参见《Nginx 如何与 Socat 配合使用》

PS:本配置兼容 《哔哩漫游》《解除b站区域限制》

@DuckSoft
DuckSoft / naiveproxy-uri-specs.md
Last active June 2, 2023 00:39
NaiveProxy URI Specification

Basic

  • NaiveProxy URIs should be standard URIs, not something using JSON and Base64 encoding, etc.
  • https / quic schemes shouldn't be used directly, since they can be confusing with the real protocols.

Rules

  • schema := naive+https | naive+quic
  • username, password := basic auth info. when there's no auth, omit both.
  • host := target host
  • port can be omitted if it's 443, or specify it explicitly
  • queries:
@k4yt3x
k4yt3x / ipa.md
Last active October 11, 2022 21:19
ipa: A shell alias that will simplify your "ip address" output

ipa

Description

ipa is a shell function that will display the distilled informaiton from the ip a command.

Screenshots

image

@vhxubo
vhxubo / FastGit.user.js
Last active February 2, 2024 16:09
GitHub Clone or download、releases 下载加速
// ==UserScript==
// @name FastGit
// @version 0.8
// @description GitHub Clone or download、Releases 下载加速
// @author Vhxubo
// @license MIT
// @icon https://github.githubassets.com/favicon.ico
// @homepage https://gist.github.com/vhxubo/d67fbd5bb3b7308b2e3690ca58e12c12
// @namespace https://gist.github.com/vhxubo/d67fbd5bb3b7308b2e3690ca58e12c12
// @match https://github.com/*/*
@tomac4t
tomac4t / ipip-bt.py
Last active April 3, 2024 12:33
IPIP Firefox Extension API
#!/usr/bin/python3
import requests
import sys
n = len(sys.argv)
for i in range (1, n):
ipipapi = "https://btapi.ipip.net/host/info?ip=" + sys.argv[i] + "&host=&lang=cn"
@imba-tjd
imba-tjd / .Cloud.md
Last active November 19, 2024 04:28
☁️ 一些免费的云资源

  • IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装。PaaS提供语言环境和框架(可以自己选)。SaaS只能使用开发好的软件(卖软件本身,如税务会计、表格文字)。BaaS一般类似于非关系数据库,但各家不通用
  • 云服务的特点:零前期成本&按需付费&弹性(类似于租,可随时多加、退掉;但没有残值)、高可用(放在机房中,不同AZ间水电隔离)

其他人的集合

package main
import (
"encoding/json"
"fmt"
"log"
"github.com/graphql-go/graphql"
)
@edp1096
edp1096 / tidb_win_build.cmd
Last active December 28, 2020 23:22 — forked from tupunco/tidb_win_build.bat
tidb build for windows
rem tidb build in pcbangstudio project folder - http://enjoytools.net/xe/board_vngc57/8978
rem go get tidb
go get -v github.com/pingcap/tidb
rem build goyacc
go build -v -o bin/goyacc.exe src/github.com/pingcap/tidb/parser/goyacc/main.go
rem then below error message will be shown. Just go on.
rem can't load package: package github.com/pingcap/tidb: no Go files in blahblah_directory