Skip to content

Instantly share code, notes, and snippets.

@snail007
snail007 / ngx_http_upload_module.c
Created March 29, 2016 05:49 — forked from adamchal/ngx_http_upload_module.c
ngx_http_upload_module.c with patch applied so that Nginx Upload Module works with Nginx 1.4.2+. To use, replace the ngx_http_upload_module.c file in https://github.com/vkholodkov/nginx-upload-module with this Gist.
/*
* Copyright (C) 2006, 2008 Valery Kholodkov
* Client body reception code Copyright (c) 2002-2007 Igor Sysoev
* Temporary file name generation code Copyright (c) 2002-2007 Igor Sysoev
*/
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <nginx.h>
@snail007
snail007 / apt-fast.sh
Created August 30, 2016 02:25 — forked from voyeg3r/apt-fast.sh
apt-fast script
#!/bin/sh
# !/bin/sh
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at admin@mattparnell.com
# Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow
# for more complex apt-get commands. See the thread: http://www.pclinuxos.com/forum/index.php/topic,66385.0.html
# Use this just like apt-get for faster package downloading. Make sure to have axel installed.
@snail007
snail007 / index.js
Created September 7, 2016 01:19 — forked from edokeh/index.js
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@snail007
snail007 / router.pi-3.md
Created September 7, 2016 01:19 — forked from snakevil/router.pi-3.md
使用树莓派3B打造超强路由之三:阴影

使用树莓派3B打造超强路由之三:阴影

在[《使用树莓派3B打造超强路由之二:初成》][之二:初成]之后,似乎接下来的工作,就是朝着整合网络扩展存储 NAS家庭影院电脑 HTPC 去努力了。但在此之前,省视实际需求,不难发现其中的阴影——公共需求和私人需求存在显著差异——如:儿童能接触到的、成年人能接触到的和我能接触到的,如何区分开?所以在开始整合前,先尝试解决这个问题。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

〇 前文提要

@snail007
snail007 / router.pi-2.md
Created September 7, 2016 01:19 — forked from snakevil/router.pi-2.md
使用树莓派3B打造超强路由之二:初成

使用树莓派3B打造超强路由之二:初成

通过第一篇《使用树莓派3B打造超强路由之一:初装》的努力,树莓派3B已经可以作为一台超低能耗、随身携带的开发用服务器来使用了。但这对于目标——打造超强路由而言,才刚刚开始。接下来,我们需要将其打磨成一台基本的无线路由器。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

@snail007
snail007 / router.pi-1.md
Created September 7, 2016 01:19 — forked from snakevil/router.pi-1.md
使用树莓派3B打造超强路由之一:初装

使用树莓派3B打造超强路由之一:初装

新款的树莓派3B功能之丰富,性能之强悍,让我垂涎。考虑到家里的网件 WNDR3700v2 也服役四年有余了。还是败了一个树莓派3B回来打造成新的路由。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

〇 安装系统

@snail007
snail007 / openwrt-barrierbreaker-rc3-handbook.md
Created September 7, 2016 01:19 — forked from snakevil/openwrt-barrierbreaker-rc3-handbook.md
OpenWrt BarrierBreaker 14.07-rc3 手记

OpenWrt BarrierBreaker 14.07-rc3 手记

1 外置存储 - ExtRoot

1.1 USB HDD 分区

安装依赖和工具包:
@snail007
snail007 / howto-setup-transparent-proxied-router.md
Created September 7, 2016 01:20 — forked from snakevil/howto-setup-transparent-proxied-router.md
如何在路由器中实现透明代理?

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@snail007
snail007 / guide-to-_etc_cron_d.md
Created September 7, 2016 01:20 — forked from snakevil/guide-to-_etc_cron_d.md
/etc/cron.d 攻略

/etc/cron.d 攻略

为什么不用 crontab

crontab 是日常使用最为频繁地定时器工具。它将每个用户的所有定时任务统一记录、统一管理。

@snail007
snail007 / gist:ea7a4418dda90f50ba88df2b3a4f1eb7
Created October 2, 2016 05:56 — forked from taoeffect/gist:8855230
DNSChain + DNSCrypt! :-D
dnscrypt-proxy --local-address=127.0.0.1:53 --resolver-address=23.226.227.93:443 --provider-name=2.dnscrypt-cert.okturtles.com --provider-key=1D85:3953:E34F:AFD0:05F9:4C6F:D1CC:E635:D411:9904:0D48:D19A:5D35:0B6A:7C81:73CB