Skip to content

Instantly share code, notes, and snippets.

View lbp0200's full-sized avatar
🎯
专注

刘博平 lbp0200

🎯
专注
View GitHub Profile
@diogok
diogok / proxy.lua
Created April 15, 2011 17:09
Simple HTTP reverse proxy in Lua
#!/usr/bin/env lua
require 'socket'
require 'copas'
assert(arg[1],"Must pass host and port to listen")
assert(arg[2],"Must pass host and port to proxy")
local config = {
newhost=string.gsub(arg[1],"([^:]+):(%d+)","%1"),
newport=string.gsub(arg[1],"([^:]+):(%d+)","%2"),
@fnando
fnando / dev.conf
Created July 23, 2011 09:00
Nginx configuration for SSH tunnel
upstream tunnel {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name dev.codeplane.com br.dev.codeplane.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@barryvdh
barryvdh / _ide_helper.php
Last active April 4, 2024 09:11
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@messense
messense / shadowsocks-on-openwrt.md
Last active June 8, 2023 07:49
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@lovemyliwu
lovemyliwu / china-unicom-cdn.md
Last active June 10, 2023 16:53
使用联通cdn加速下载

120.52.72.*/original-uri

ip 地址获取脚本

window.success = [];
function test() {
    for(var idx=1;idx<255;idx++){
        var el = document.createElement('img');
        el.src = '//120.52.72.' + idx + '/41.media.tumblr.com/5cb6715c800c5b00969f33c162b317d1/tumblr_nzjh7dPKcD1ssbwqro1_540.png';
@4ft35t
4ft35t / xdown.sh
Last active August 4, 2017 04:35
Download file use ISP's cache server for more speed.
#!/bin/bash
[ $# -eq 0 ] && echo "see aria2c -h" && exit
url=""
cdn='
120.52.73.2
120.52.73.4
120.52.73.6
120.52.73.7
120.52.73.10
@bwann
bwann / README.md
Last active March 19, 2024 00:43
Tunnelling SSH over SSL/TLS

How to tunnel SSH over SSL/TLS

laptop ssh -> laptop stunnel -> evil network -> internet -> your server -> your server ssh

Server (your shell server/home box/work box/whatever)

Sets up a stunnel process listening externally on port 2443/tcp, forwards to localhost 22/tcp

  • Install stunnel, e.g. yum install stunnel
  • Install server config snippet to /etc/stunnel/stunnel.conf
title date tags
GCMForMojo 的部署与设置
2017-01-21 11:07:03 -0800
GCM
Android

2017年2月6日更新:完善部分内容,更新内容

2017年2月8日更新:发现自己脑抽少写了一步较为关键的步骤,赶紧补上orz,连带解决笔误

@wwek
wwek / httpsproxy.go
Created October 29, 2017 05:41
https proxy in golang
// https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c
// #!/usr/bin/env bash
// case `uname -s` in
// Linux*) sslConfig=/etc/ssl/openssl.cnf;;
// Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;;
// esac
// openssl req \
// -newkey rsa:2048 \
// -x509 \