Skip to content

Instantly share code, notes, and snippets.

@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并且可以使用了。

@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并且可以使用了。

@zhenhappy
zhenhappy / gitlab-webhook-push.php
Created June 28, 2019 15:28 — forked from pitchart/gitlab-webhook-push.php
A simple php script to manage gitlab push webhook
<?php
/**
* GitLab Web Hook
* See https://gitlab.com/kpobococ/gitlab-webhook
*
* This script should be placed within the web root of your desired deploy
* location. The GitLab repository should then be configured to call it for the
* "Push events" trigger via the Web Hooks settings page.
*
* Each time this script is called, it executes a hook shell script and logs all
@zhenhappy
zhenhappy / pcap_dnsproxy.rb
Last active May 28, 2018 08:54
pcap_dnsproxy.rb
class PcapDnsproxy < Formula
desc "Powerful DNS proxy designed to anti DNS spoofing"
homepage "https://github.com/chengr28/Pcap_DNSProxy"
url "https://github.com/chengr28/Pcap_DNSProxy/archive/v0.4.9.4.tar.gz"
sha256 "9d2f6026d05dbfb8795cec0a4341b7d947c6abe4280353bdcf4793679ec296f2"
head "https://github.com/chengr28/Pcap_DNSProxy.git"
bottle do
rebuild 1
sha256 "dece914ff9c114edff0392682722f0e88776c80f653ebe0365e37ccda289e2b7" => :high_sierra
@zhenhappy
zhenhappy / supervisord.conf
Created October 15, 2017 11:53
supervisord.conf
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Quotes around values are not supported, except in the case of
; the environment= options as shown below.
@zhenhappy
zhenhappy / 3312899-The-Wolf-The-Hare.json
Created February 23, 2017 05:44
3312899-The-Wolf-The-Hare
{
"name": "The Wolf & The Hare",
"price": "0.01",
"intro": "Preview of a lil something I'm working on.",
"cover": "https://d13yacurqjgara.cloudfront.net/users/114736/screenshots/3312899/wolf-and-hare1-pkomierowski_1x.jpg"
}
@zhenhappy
zhenhappy / 3312364-Work-Sucks-Title-Image.json
Last active February 23, 2017 05:43
3312364-Work-Sucks-Title-Image
{
"name": "Work Sucks Title Image",
"price": "0.01",
"intro": "A title image for the CEO of Evernote's presentation, \"Work Sucks... but only if you let it.",
"cover": "https://d13yacurqjgara.cloudfront.net/users/1411165/screenshots/3312364/work-sucks-title-image_1x.png"
}
@zhenhappy
zhenhappy / 3312555-A-h3-i.json
Last active February 23, 2017 05:45
3312555-A-h3-i
{
"name": "Aé$†h3†iç$",
"price": "0.01",
"intro": "Starting a new personal project to widen my range of aesthetics. Hopefully I'll land on something somewhat ownable.I'll be posting one style a day on Instagram. You can follow along here.Well, roughly one style a day. Cuz I'll be mad 'laxin on the weekends. ;)",
"cover": "https://d13yacurqjgara.cloudfront.net/users/37624/screenshots/3312555/fitaday_1x.jpg"
}
@zhenhappy
zhenhappy / 3312626-DesignInc-Wallpapers.json
Last active February 23, 2017 05:45
3312626-DesignInc-Wallpapers
{
"name": "DesignInc Wallpapers",
"price": "0.01",
"intro": "Being an active member of DesignInc and a fan of the branding, I have designed some wallpapers.Full size versions attached.",
"cover": "https://d13yacurqjgara.cloudfront.net/users/61921/screenshots/3312626/di1_1x.png"
}
@zhenhappy
zhenhappy / 3312768-Twitch-2016-Year-In-Review.json
Created February 23, 2017 05:40
3312768-Twitch-2016-Year-In-Review
{
"name": "Twitch 2016 Year In Review",
"price": "0.01",
"intro": "Our team just completed a large project for the Twitch 2016 \"Year In Review.\" Can see/play the live interactive site here.Lots of work went into this by the whole team, especially our 2D Illustrator, @Darren Geers. He even \"painted in\" all of the destruction/chaos over my render for Level 2, Apocalyptic City. All motion work done on the site by @Matt Gravish.",
"cover": "https://d13yacurqjgara.cloudfront.net/users/11867/screenshots/3312768/retrospective_1x.jpg"
}