使用脚本实现登录时的Num Lock 状态
[ 2006/08/24 08:55 | by gOxiA ]
通常我们为了实现数字键盘打开都会编辑注册表,对于初手要记住老长的键位确实够难的,所以我们可以通过脚本来实现此要求,编写的脚本放到启动项或同过组策略自动运行即可。不过我怎么感觉这样很麻烦,呵呵!总之微软既然为大家提供了此HOWTO我想还是应该学习利用一下的。脚本内容如下:
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"
WshShell.SendKeys "{NUMLOCK}"
保存为numlock.vbs即可!
FreeBSD-安装多线程下载软件axel提速Ports安装
[ 2006/08/15 13:12 | by gOxiA ]
FreeBSD的方便之处在于Ports安装模式,他可以使我们获取最新版本的应用软件并且方便的安装在我们的FreeBSD系统上,可是当我们在使用Ports方式安装时,最痛苦的莫过于它的下载速度,现在我们可以借助axel来提速Ports,实际效果非常明显。
一、安装axel
二、配置make.conf
一、安装axel
# cd /usr/ports/ftp/axel
# make install
# make install
二、配置make.conf
# ee /etc/make.conf
加入:
FETCH_CMD=axel
FETCH_BEFORE_ARGS= -n 10 -a
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes
MASTER_SITE_OVERRIDE?=\
http://ports.hshh.org/${DIST_SUBDIR}/\
http://ports.cn.freebsd.org/${DIST_SUBDIR}/\
ftp://ftp.freeBSDchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}
加入:
FETCH_CMD=axel
FETCH_BEFORE_ARGS= -n 10 -a
FETCH_AFTER_ARGS=
DISABLE_SIZE=yes
MASTER_SITE_OVERRIDE?=\
http://ports.hshh.org/${DIST_SUBDIR}/\
http://ports.cn.freebsd.org/${DIST_SUBDIR}/\
ftp://ftp.freeBSDchina.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}
FreeBSD-网络优化
[ 2006/08/15 12:52 | by gOxiA ]
在网上找到一篇关于FreeBSD网络优化的文章,特转记于此:
# ee /etc/sysctl.conf
net.inet.ip.check_interface=1
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.tcp.recvspace=65535
net.inet.tcp.sendspace=65535
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=2097152
net.inet.ip.redirect=0
net.inet.icmp.icmplim=100
net.inet.tcp.always_keepalive=1
net.inet.tcp.delayed_ack=1
net.inet.udp.maxdgram=65535
net.local.stream.sendspace=65535
net.local.stream.recvspace=65535
kern.maxfiles=65536
kern.maxfilesperproc=65536
net.inet.udp.checksum=1
net.inet.tcp.msl=7500
net.inet.tcp.syncookies=1
net.inet.icmp.bmcastecho=0
net.inet.icmp.maskrepl=0
kern.securelevel=0
net.inet.ip.check_interface=1
net.inet.tcp.blackhole=2
net.inet.udp.blackhole=1
net.inet.tcp.recvspace=65535
net.inet.tcp.sendspace=65535
kern.ipc.somaxconn=32768
kern.ipc.maxsockbuf=2097152
net.inet.ip.redirect=0
net.inet.icmp.icmplim=100
net.inet.tcp.always_keepalive=1
net.inet.tcp.delayed_ack=1
net.inet.udp.maxdgram=65535
net.local.stream.sendspace=65535
net.local.stream.recvspace=65535
kern.maxfiles=65536
kern.maxfilesperproc=65536
net.inet.udp.checksum=1
net.inet.tcp.msl=7500
net.inet.tcp.syncookies=1
net.inet.icmp.bmcastecho=0
net.inet.icmp.maskrepl=0
kern.securelevel=0
# ee /boot/loader.conf
kern.maxdsiz="536870912"
kern.ipc.maxsockets="4008"
kern.ipc.nmbclusters="32768"
kern.ipc.nmbufs="65535"
kern.ipc.nsfbufs="2496"
net.inet.tcp.tcbhashsize="2048"
kern.maxdsiz="536870912"
kern.ipc.maxsockets="4008"
kern.ipc.nmbclusters="32768"
kern.ipc.nmbufs="65535"
kern.ipc.nsfbufs="2496"
net.inet.tcp.tcbhashsize="2048"
# shutdown -r now






