Skip to content

Instantly share code, notes, and snippets.

View eczn's full-sized avatar
Star

eczn* eczn

Star
View GitHub Profile
@zhenhappy
zhenhappy / vpn_route.md
Created February 11, 2020 07:30 — forked from shalyf/vpn_route.md
利用路由表给VPN分流

2020年初因为武汉肺炎爆发,所以在家办公,公司给配置了L2TP的VPN,但是我不想所有流量都走VPN(VPN比较慢而且也节省流量),于是想到用路由表给VPN分流。
具体的方案就是公司内网的流量走VPN,外网流量走默认网关。

我是在macOS上操作的,其他平台应该也差不多。

假设:
公司内网 192.168.10.0/24
家里网络 192.168.1.0/24 你已经配置好VPN并且可以使用了。

@Jack-Works
Jack-Works / 2018.js
Last active March 1, 2024 02:23
cRAzY eSnEXt (*all* proposals mixed in)
#! Aaaaaaaaaaa this is JS!!!
// https://github.com/tc39/proposal-hashbang
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics
// Enjoy!!!
// Created at Nov 23, 2018
for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator
|> do { // https://github.com/tc39/proposal-do-expressions
case(?) { // https://github.com/tc39/proposal-pattern-matching
when {val}: class {
@oussamahamdaoui
oussamahamdaoui / devtools-backend.ts
Last active January 14, 2025 06:03
Detect devtools open and close events tested on Chrome and Safari,
/**
Any server would do as long as there is a path that sets a cookie named devtools
**/
//@ts-ignore
import { Bun } from 'bun';
import fs from "fs";
export default {
port: 3000,
extension Task where Failure == Error {
// Start a new Task with a timeout. If the timeout expires before the operation is
// completed then the task is cancelled and an error is thrown.
init(priority: TaskPriority? = nil, timeout: TimeInterval, operation: @escaping @Sendable () async throws -> Success) {
self = Task(priority: priority) {
try await withThrowingTaskGroup(of: Success.self) { group -> Success in
group.addTask(operation: operation)
group.addTask {
try await _Concurrency.Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000))
@Papersman
Papersman / workers.js
Last active November 28, 2025 02:39
mikan_cloudflare_workers
/*
* https://github.com/netnr/workers
*
* 2019-10-12 - 2022-05-05
* netnr
*
* https://github.com/Rongronggg9/rsstt-img-relay
*
* 2021-09-13 - 2022-05-29
* modified by Rongronggg9