Skip to content

Instantly share code, notes, and snippets.

@wbbim
wbbim / nginx.conf
Last active August 29, 2015 14:10 — forked from xuyuanme/nginx.conf
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.nginx.org/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################
Hello World
# /etc/nginx/sites-available/blog.shellexy.info
server {
resolver 8.8.8.8;
listen 80;
server_name blog.shellexy.info;
#access_log off;
access_log /var/log/nginx/blog.shellexy.info.access.log;
location / {
#避免远方启用压缩导致无法替换纯文本
proxy_set_header Accept-Encoding "";
@wbbim
wbbim / gist:d1e0d2eda4cc3ad9f68a
Created May 12, 2015 15:51
wo,com.ru图片代理
server
{
listen 80;
listen 443;
server_name wo.com.ru;
ssl_certificate /etc/nginx/ssl/wo.crt;
ssl_certificate_key /etc/nginx/ssl/wo.pem;
#location /{#这样的话就可以代理大部分网页 下面则限定代理文件后缀
@wbbim
wbbim / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@wbbim
wbbim / gist:3ab2f746bb09ed54f2bf
Created January 21, 2016 14:37
wordpress 加速
if ( !is_admin() ) {
add_action('wp_loaded','c7sky_ob_start');
function c7sky_ob_start() {
ob_start('c7sky_qiniu_cdn_replace');
}
function c7sky_qiniu_cdn_replace($html){
$local_host = 'https://www.17.tf'; //博客域名
$qiniu_host = 'https://o1b3xtzrf.qnssl.com'; //七牛域名
@wbbim
wbbim / china-unicom-cdn.md
Created March 7, 2016 15:08 — forked from lovemyliwu/china-unicom-cdn.md
使用联通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';