respond_todo|format|if@item.saveformat.html{redirect_to@item,notice:'Item was successfully created.'}format.json{renderjson:@item,status::created,location:@item}elseformat.html{renderaction:"new"}format.json{renderjson:@item.errors,status::unprocessable_entity}endend
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
unexec: cannot write section __data
--- List of All Regions ---
address size prot maxp
--- List of Regions to be Dumped ---
address size prot maxp
--- Header Information ---
Magic = 0xfeedfacf
CPUType = 16777223
CPUSubType = -2147483645
FileType = 0x2
NCmds = 20
SizeOfCmds = 3464
Flags = 0x00200085
Highest address of load commands in input file: 0x5dd000
Lowest offset of all sections in __TEXT segment: 0x22f0
--- List of Load Commands in Input File ---
我平时用的系统是 Windows 7 和 Mac OS X,实验室项目一般都是 ssh 远登到 Ubuntu 和 Linux 上开发的。有时碰到内核和虚拟机等项目编译比较耗时,编译开始后要时不时的看一下编译任务是否完成,或者有没有中途出错,这时候如果有个通知系统就比较方便了。
Google 了一把找到了 netgrowl 这个好东东,它是一个开源的 Python 模块,实现了 Growl 协议,可以向 Mac 或 Windows 上的 Growl 服务发送通知。使用也非常方便,先用 GrowlRegistrationPacket 函数注册一个应用,接着就可以用 GrowlNotificationPacket 发送通知了:
notify.py
12345678910111213141516171819202122
#!/usr/bin/pythonfromnetgrowlimport*importsystitle="Notification from Ubuntu"desc=""iflen(sys.argv)>2:title=sys.argv[1]desc=sys.argv[2]addr=("10.131.251.101",GROWL_UDP_PORT)s=socket(AF_INET,SOCK_DGRAM)p=GrowlRegistrationPacket(application="Ubuntu",password="i")p.addNotification("Ubuntu Notifications",enabled=True)s.sendto(p.payload(),addr)p=GrowlNotificationPacket(application="Ubuntu",notification="Ubuntu Notifications",title=title,description=desc,priority=1,sticky=True,password="i")s.sendto(p.payload(),addr)s.close()