Other growlnotify用法

growlnotify usage:

growlnotify -s -t \'Title\' -m \'Message\'

-s Sticky 
-m Message
-t Tilte
-p Priority
-H, -host Network

Other 缓冲协议

@protocol BufferSaveFilterProtocol : NSObject
- (NSFileHandle*)buffer:(Buffer*)aBuffer willSaveFile:(NSFileHandle*)aFileHandle;
@end

Other tar命令

tar -czvf file.tar.gz dir/*

Other Prueba

10 print "Hola mundo"

Other wsh_setClipboard

function setClip( txt )
{
	var ie = new ActiveXObject( "InternetExplorer.Application" );
	ie.Navigate( "about:blank" );
	
	while( ie.Busy ) WScript.Sleep( 50 );
	
	ie.Document.parentWindow.clipboardData.setData( "text", txt );
	ie.Quit( );
}

Other css字体速记

div {
font: normal uppercase bold 1em/1.6em verdana, arial, sans-serif;
}

Other 查找并ping默认网关

One that checks if there is a default gateway and if so pings it and displays both the gateway and the response time:
Code:	

shopt -s extglob
GW=$(netstat -rn|grep ^default|awk '{print $2}')
if [[ ! $GW == +([[:digit:]]).+([[:digit:]]).+([[:digit:]]).+([[:digit:]]) ]]; then
   echo "no default gateway"
   exit 1
fi
IFS=''
PING=`ping -c1 -n -t5 -o $GW`
RC=$?
if [ $RC -eq 2 ]; then
   echo "gateway ($GW) no reply"
   exit 1
fi
RT=$( echo $PING | head -n2 | tail -n1 | awk -F= '{print $4}' )
echo "gateway ($GW) $RT"
exit $RC

Other Ping随机IP以查看是否存在连接

One that just checks a random IP on the internet to see if we have internet access:
Code:	

shopt -s extglob
GW=216.239.32.10
IFS=''
PING=`ping -c1 -n -t5 -o $GW`
RC=$?
if [ $RC -eq 2 ]; then
   echo "Internet ($GW) no reply"
   exit 1
fi
RT=$( echo $PING | head -n2 | tail -n1 | awk -F= '{print $4}' )
echo "Internet ($GW) $RT"
exit $RC

Other trac-admin命令行initenv示例

sudo trac-admin /Library/WebServer/trac/BIO_001_002 initenv BIO_001_002 sqlite:db/trac.db /Users/ctldev/repository/BIO_001_002 /sw/share/trac/templates

Other 在Mac OS X上重新启动apache


sudo apachectl restart