发布时间:2015-09-02 19:06:05
不太清楚这个目的是什么,可能用在某些场景,比如不想大费周章的写个def。如下所示:
>>> s = [('a', 3), ('b', 2), ('c', 1)]
>>> sorted(s, key=lambda x:x[1])
[('c', 1), ('b', 2), ('a', 3)]
>>> max(s, key=lambda x:x[1])
('a.........【阅读全文】
发布时间:2015-09-01 16:56:47
1. 某个旧的dell power connect 交换机下连的mac book pro 没办法DHCP获取IP地址,手动分配可行,尝试升级firmware解决了,思路比较简单。<br /><br />copy tftp://x.x.x.x/YY.ZZ image 然后根据官方网站下载firmware的release note/procedure来操作。记得事先备份配置,方法相反<br /><br />copy start-config tftp://x.........【阅读全文】
发布时间:2015-08-26 11:38:58
日志出现了 too many open files
cat /etc/security/limits.d/90-nproc.conf # 优先级超过 /etc/security/limits.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasonin.........【阅读全文】
发布时间:2015-08-25 11:56:14
SYN Flood Protection
These settings added to sysctl.conf will make a server more resistant to SYN flood attacks. Applying configures the kernel to use the SYN cookies mechanism, with a backlog queue of 1024 connections, also setting the SYN and SYN/ACK retries to an effective ceiling of.........【阅读全文】
发布时间:2015-08-20 17:27:40
穷极无聊而作,本来是可以bash来完成的,没啥技术含量可言,注意的是要想把配置一口气输入,需要执行skip-page-display, cisco的交换机应该是 terminal length 0 。
......【阅读全文】