如果只是全文件的用本地或远程:
git checkout --ours index.html
git checkout --theirs _layouts/default.html
- ours:本地
- theris:远程
如果想全部文件都采用上述策略:
git merge -Xours
git merge -Xtheirs
[......]
如果只是全文件的用本地或远程:
git checkout --ours index.html
git checkout --theirs _layouts/default.html
如果想全部文件都采用上述策略:
git merge -Xours
git merge -Xtheirs
[......]
在我们自己搭建的服务器上,经常需要使用postfix/sendmail发送邮件。
如果只是内部使用,使用默认的配置就可以发送成功。但当需要发送给外网客户的时候,经常会遇到邮件无法被正常接收的情况。这是因为我们自身的配置邮件MX域名并不能被对方识别为可信任。
为了解决这种情况,我们可以让MX地址指向当前主机,也可以采用本文介绍的另一种方法:使用第三方relay发送邮件。
首先,你要有一个支持SMTP的邮箱,比如我的是vip.sina.com的。
然后如下配置
sudo v[......]
默认zlib的API,是只压缩数据,无法处理gzip文件的,因为无法解析头文件信息。
备注:初始化参数那个,也可以这么搞 MAX_WBITS + 16,读了Python的源码用的是这种方法。
以下转载自:http://www.lemoda.net/c/zlib-open-read/
压缩:
#include <stdio.h>
#include <zlib.h>
#include <stdlib.h>
#include <str[......]
首先是获取Base64的encode字符串:
echo -n "username:password" | openssl base64
然后是使用axel
axel -H "Authorization: Basic base64HashValue" "yourURL"
当然,也可以使用二合一的方法:
axel -H "Authorization: Basic $(echo -n 'username:password' | openssl base64)" "yourURL"
&[......]
apt-get install lighttpd lighttpd-mod-webdav apache2-utils
#install lighttpd and additional module lighttpd-mod-webdav
#apache2-utils:htpasswd to generate webdav password file, lighttpd also reuse it
chown www-data:www-data /var/run/lighttpd/
#[......]