Skip to content

Instantly share code, notes, and snippets.

View hanzhangyu's full-sized avatar
👻
I may be slow to respond.

PaulHan hanzhangyu

👻
I may be slow to respond.
View GitHub Profile
@hanzhangyu
hanzhangyu / iterm2-solarized.md
Created January 2, 2020 03:52 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@hanzhangyu
hanzhangyu / build_openvpn.sh
Created November 18, 2019 01:53 — forked from finghine/build_openvpn.sh
用docker创建openvpn脚本
#!/bin/bash
# 配置文件所在目录
CONFIG_DIR='/home/ff/ovpn-data-example'
# 服务器ip
# SERVER_DOMAIN_IP='192.168.2.133'
SERVER_DOMAIN_IP=`curl -s ipinfo.io/ip`
# 暴露的 UDP 端口
EXPORT_PORT='1194'
# 客户端名字
@hanzhangyu
hanzhangyu / http2.js
Created September 30, 2019 02:31 — forked from davidgilbertson/http2.js
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};