I hereby claim:
- I am shiziwen on github.
- I am shiziwen (https://keybase.io/shiziwen) on keybase.
- I have a public key ASD_Y1RWMgoJ5bznn0MNpAE6LLUrbq3Gr7y37wqLoyiU9Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| server { | |
| server_name $domain_name; | |
| root /var/www; | |
| index index.html index.php; | |
| access_log /var/log/nginx/access.log; | |
| error_log /var/log/nginx/error.log; | |
| # Cache static files for as long as possible | |
| location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ { | |
| try_files $uri =404; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| import string | |
| try: | |
| import pycurl2 as pycurl | |
| except: | |
| import pycurl | |
| import urllib |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| # 1. Make sure you have nginx sub module compiled in | |
| # nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module' | |
| # 2. add two directives below at HTTP level | |
| # nginx.conf | |
| http { | |
| # ...... | |
| sub_filter '</head>' '<style type="text/css">html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ |

在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)
安装nettalk