设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:
[http "https://github.com"]
proxy = socks5://127.0.0.1:1086
| /** | |
| * Gemini generated object to original schema compatible object converter | |
| * | |
| * Utility to convert Gemini generated objects back to their original schema format. | |
| * Pairs with gemini.schema-converter.ts | |
| */ | |
| import { z } from "zod"; | |
| function findDiscriminatorKey(schema: z.ZodTypeAny): string | null { | |
| if (schema instanceof z.ZodUnion) { |
| Portable Version KEYS: | |
| P6Z3T-UYJC9-YAK3F-APN9M-6ZDSD | |
| FGZPK-93CWX-Q33Y6-D5URV-YXC3X | |
| 9CZQX-9YAQA-PF33L-XVUQH-NSD48 | |
| 8RZ3L-H3Y5L-W2RY5-Z5M8N-C7Z2U | |
| CCZNU-LW3LF-K9V2T-MYZFF-94667 | |
| EWZM6-3W4UX-KH922-C96GK-VGBH2 | |
| Standard Version KEYS: | |
| 4AZNW-S2YHE-LLMWM-J6EL8-7QKDL |
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
| adapter: | |
| #ss代理, 在国内购买一台云服务器,安装好ShadowSocks代理服务器,iPhone版安装Wingy APP (SMART LIMITED的深蓝紫色免费版)。使用的本文的自定义配置YAML | |
| - id: proxyAdapter | |
| type: ss | |
| #修改ss_host为服务器地址 | |
| host: ss_host | |
| #修改ss_port为端口号 | |
| port: ss_port | |
| #修改ss_password为密码 | |
| password: ss_password |
| [global] | |
| # TDS protocol version | |
| tds version = 7.0 | |
| client charset = UTF-8 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>info.yuzhuohui.shadowsocks</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/node</string> | |
| <string>/var/shadowsocks-nodejs/local.js</string> |
| Shadowsocks 启动脚本 | |
| # insserv -v -d /etc/init.d/shadowsocks | |
| ===================== | |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: shadowsocks | |
| # Required-Start: $local_fs $remote_fs $network $syslog | |
| # Required-Stop: $local_fs $remote_fs $network $syslog |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| import os | |
| import httplib | |
| import tornado.web | |
| class ErrorHandler(tornado.web.RequestHandler): | |
| """Generates an error response with status_code for all requests.""" | |
| def __init__(self, application, request, status_code): | |
| tornado.web.RequestHandler.__init__(self, application, request) | |
| self.set_status(status_code) | |