手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 免费部署 N8N 的 Zeabur 注册 | 登陆
浏览模式: 标准 | 列表全部文章

proftpd 问答

Frequently Asked Questions
Question: Why do I see the following when my proftpd starts up?

  getaddrinfo 'hostname' error: No address associated with hostname   warning: unable to determine IP address of 'hostname' 

Answer: This error is ProFTPD's way of reporting that it was unsuccessful in resolving hostname to an IP address. Fixing this is a matter of configuring DNS for that hostname: properly set up an IP address for that DNS name in your DNS server, use a DNS name that has an IP address, or (as a quick fix/last resort) add that DNS name to your /etc/hosts file. The proper solution depends largely on the circumstances.

Question: If proftpd resolves any DNS names to IP addresses when it starts up, and I am using dynamic IP addresses which change after my proftpd has started, will proftpd see my new IP addresses?
Question: Unfortunately not. ProFTPD has no easy way of handling dynamic IP addresses by itself. One way of dealing with this situation is to restart proftpd periodically, which will force it to re-parse its configuration and thus re-resolve all IP addresses.

Question: What if I do not want proftpd to use DNS to resolve the hostname to an IP address because I am in an environment where there is no DNS at all?
Answer: In ProFTPD 1.3.3rc1, support for a new -S command-line option was added. This option can be used to specify the IP address of the host machine. By default, proftpd attempts to resolve the host IP address by using DNS resolution of the hostname. However, in cases where DNS is not configured for the host machine, this approach does not work.

To specify the desired IP address, use -S when starting proftpd, e.g.:

  /usr/local/sbin/proftpd -S 1.2.3.4 ... 

And if you want proftpd to listen on all interfaces, you can specify a wildcard socket using an IP address of 0.0.0.0:

/usr/local/sbin/proftpd -S 0.0.0.0 ...

Note that will also mean that, in your proftpd.conf, any <VirtualHost> sections will need to use IP addresses, not DNS names.

Tags: proftpd

PHP 飞信类

偷了个懒,代码扔在github上了。
用法也很简单:

    $fetion = new PHPFetion('用户名','密码');     $fetion->send('对方手机','信息');     会自动识别自己还是对方。(非好友不能发哦)

也实现了$fetion->multiSend,但我偷了个懒,直接循环用send发送了。
事实上,可以在刚登录的时候,利用group先将好友列表拉回来,然后就方便了。但觉得这样就复杂了。何必呢。。一般在用飞信的时候,也很少会用到群发功能吧。所以,我还是循环的send。黑黑

代码地址:https://github.com/neatstudio/yiiextension
欢迎围观

Tags: 飞信, fetion

网站2天不能访问的原因

网站有两天不能访问 ,原因是这两天好象母机重启还是什么?突然上面的信息全部消息了。
重启一下,重挂载一下就OK了。

目前恢复正常

yiibooster+bsie

对于使用yii框架来说,如果使用bootstrap框架的话,现在有一个比较方便的使用途径:yiibooster。
官网地址是:http://yii-booster.clevertech.biz/
当然,我们都知道bootstrap几乎是不支持IE 6的。所以这时候,为了兼容IE6,还得冒出个:BSIE(鄙视IE),官方地址为:https://github.com/ddouble/bsie

有了这两样东西,开发起来是不是快了很多,至少你不用太关心页面是怎么做的了。而且变形,还没有那么夸张。更为可贵的是,你在手机上也能够正常浏览。
比如:http://photo.pinjian.net。就支持了手机浏览,只是界面难看了点罢了

Tags: yiibooster, bsie, yii

How to Delete a Space-Hogging Sleep File sleepimage

原文来自:http://macperformanceguide.com/Mac-optimize-sleepimage.html
原文很长,其实。。。集中起来就那么几句话:

1、sudo pmset hibernatemode 0
2、sudo rm -rf /private/vm/sleepimage

当然删除了之后,会有一些问题,是什么呢?是这个啦:

Warning:

(1) With Hibernate on a laptop computer disabled, any unsaved work will be LOST if the battery power runs out, because memory will not be written to disk.

(2) Turning Hibernate off on a laptop is NOT a recommendation per se, but rather an advanced technique for users wishing to squeeeze out more drive space, and find the side effect in (1) acceptable.

如果你并不是特别在意内容的丢失,或者你一直有电,就不用管它了。。

Tags: sleepimage