import socketdictlist ={};def ReadHost(): hosts = []; obn = open('d:/sss.txt', 'rb'); for line in obn: #sometime you should filter \r\...
分类:
其他好文 时间:
2014-06-28 21:53:30
阅读次数:
234
$ vim /home/wangzheng/.ssh/configHost 10.103.xx.xx HostName 10.103.xx.xxUser root Port 22022 $ ssh 10.103.xx.xxThe authenticity of host '[10.103.xx...
分类:
其他好文 时间:
2014-06-18 19:26:03
阅读次数:
161
碰到需要调用操作系统shell命令的时候,Ruby为我们提供了六种完成任务的方法:1.Exec方法:Kernel#exec方法通过调用指定的命令取代当前进程: 例子: $ irb >> exec 'echo "hello $HOSTNAME"' hello nate.local $值得注意的是,ex...
分类:
其他好文 时间:
2014-06-18 16:00:48
阅读次数:
214
Android SDK Manager 消除SDK更新时的“https://dl-ssl.google.com refused”错误消除SDK更新时,有可能会出现这样的错误:Download interrupted: hostname in certificate didn't match: !=....
分类:
移动开发 时间:
2014-06-18 13:36:14
阅读次数:
249
修改:C:\Windows\System32\drivers\etc\hosts文件# google websites.203.208.46.180 ssl.gstatic.com203.208.46.180 oauth.googleusercontent.com203.208.46.180 r30...
分类:
Web程序 时间:
2014-06-18 13:32:18
阅读次数:
311
问题原因 : 中国的GW屏蔽了google服务,导致无法同步账号信息,这是一个很好的功能。可以同步书签,插件等!跟chrome的版本号无关,设置hosts文件就能够正常运行(文件位置 : C:\Windows\System32\drivers\etc\hosts)。可能会存在不能保存的hosts问题...
分类:
其他好文 时间:
2014-06-17 21:49:40
阅读次数:
562
系统# uname -a # 查看内核/操作系统/CPU信息# head -n 1 /etc/issue # 查看操作系统版本# cat /proc/cpuinfo # 查看CPU信息# hostname # 查看计算机名# lspci -tv # 列出所有PCI设备# lsusb -tv # 列出...
分类:
系统相关 时间:
2014-06-17 20:37:32
阅读次数:
370
公司师兄教的一种方法:
将如下脚本,加入到/etc/profile最后即可
PS1="`whoami`@`hostname`:"'[$PWD]'
history
USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`
if [ "$USER_IP" = "" ]
then
USER_IP=`...
分类:
其他好文 时间:
2014-06-17 18:43:29
阅读次数:
216
检查HP服务器硬盘状态脚本(如有问题则发邮件通知):#vidisk.sh按a或i进入编辑模式#!/bin/bashName=`hostname`Date=`date+%m%d%y`Num=`dmidecode|grep-i‘serialnumber‘|head-n1`Disk=`hpacuclictrlallshowconfig|grepphysicaldrive|awk-F[:""]+‘{print$15}‘`#echo$Diski=1;for..
分类:
其他好文 时间:
2014-06-17 17:44:32
阅读次数:
328