Skip to content

Instantly share code, notes, and snippets.

View fefz's full-sized avatar
💭
I may be slow to respond.

swing fefz

💭
I may be slow to respond.
View GitHub Profile
@fefz
fefz / haproxy.cfg
Created October 2, 2020 03:58
use Haproxy to route different proxy app
# haproxy1.8 version
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
# HTTP 端口
port: 7890
# SOCKS5 端口
socks-port: 7891
# Linux 及 macOS 的 redir 端口
# redir-port: 7892
allow-lan: false
@fefz
fefz / nginx-tls.conf
Last active September 11, 2018 14:07 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#
@fefz
fefz / parasitic-combination-inheritance.js
Created November 29, 2017 01:40 — forked from w1shen/parasitic-combination-inheritance.js
Parasitic Combination Inheritance
function obj(o) {
function F() {}
F.prototype = o;
return new F();
}
function inheritPrototype(sub, sup) {
var p = obj(sup.prototype);
p.constructor = sub;
sub.prototype = p;
@fefz
fefz / sh
Last active August 20, 2017 23:48
access google voice
#!/bin/bash
#replace `curl link` with your curl link
test(){
res=$(`curl link` -s)
if [[ ${res:0-9:5} -eq "again" ]]; then
echo ${res:0-9:5}
sleep 3
test
elif [[ ! ${res:0-9:5} -eq "again" ]]; then
echo "exit"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
p{
word-break: break-all;
}
@fefz
fefz / install.sh
Last active November 2, 2016 01:57
a shell script to install wildfly9.0.0 on ubuntu
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 9
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash wildfly-install.sh
#tested-version :9.0.0.Final
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22