This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:List dragEnabled="true" dragMoveEnabled="true"> | |
<s:dataProvider> | |
<s:ArrayCollection> | |
<fx:Object label="Item one"/> | |
<fx:Object label="Item two"/> | |
<fx:Object label="Item three"/> | |
</s:ArrayCollection> | |
</s:dataProvider> | |
</s:List> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 试着改回正常值 | |
$ sudo serveradmin settings nat:natportmap_interface = "en1" | |
nat:natportmap_interface = "en1" | |
$ sudo serveradmin settings nat:interface = "en0" | |
nat:interface = "en0" | |
# 等10秒看看servermgrd起来没 | |
$ ps aux | grep servermgrd | grep -v grep | |
root 7687 0.0 0.2 2577788 38484 ?? Ss 2:20PM 0:03.57 servermgrd -x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 查看NAT服务配置 | |
$ sudo serveradmin settings nat | |
nat:reverse = no | |
nat:unregistered_only = yes | |
nat:same_ports = yes | |
nat:natportmap_interface = "en0" | |
nat:log = yes | |
nat:clamp_mss = yes | |
nat:dynamic = yes | |
nat:log_denied = no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
May 12 14:20:39 mes servermgrd[7658]: servermgr_ipfilter:ipfw config:Notice:Flushed IPv4 rules | |
May 12 14:20:39 mes servermgrd[7658]: servermgr_ipfilter:ipfw config:Notice:Flushed IPv6 rules | |
May 12 14:20:39 mes com.apple.launchd[1] (com.apple.servermgrd[7658]): Job appears to have crashed: Segmentation fault | |
May 12 14:20:39 mes com.apple.launchd[1] (com.apple.servermgrd): Throttling respawn: Will start in 9 seconds | |
May 12 14:20:39 mes com.apple.ReportCrash.Root[7607]: 2010-05-12 14:20:39.824 ReportCrash[7607:440b] Saved crash report for servermgrd[7658] version ??? (???) to /Library/Logs/DiagnosticReports/servermgrd_2010-05-12-142039_localhost.crash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open("/etc/bootpd.plist", "r+") do |f| | |
while l = f.gets | |
if l =~ /detect_other_dhcp_server/ | |
puts "disable dhcp detect at line : #{f.lineno}" | |
f.puts "\t<integer>0</integer>\n" | |
end | |
end | |
end | |
pid = `ps -e | grep bootpd | grep -v grep | awk '{print $1}'` | |
puts "tell bootpd reload configure : #{Process.kill('HUP', pid.to_i)}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date'; start,days,summary = DateTime.new(2010,1,1),76,'到'; puts %{BEGIN:VCALENDAR\nPRODID:-//Google Inc//Google Calendar 70.9054//EN\nVERSION:2.0\nCALSCALE:GREGORIAN\nMETHOD:PUBLISH\nX-WR-TIMEZONE:UTC\nX-WR-CALDESC:}; days.times { puts %{BEGIN:VEVENT\nDTSTART;VALUE=DATE:#{start.strftime('%Y%m%d')}\nDTEND;VALUE=DATE:#{start = start.next; start.strftime('%Y%m%d')}\nSUMMARY:#{summary}\nEND:VEVENT} }; puts %{END:VCALENDAR} |
NewerOlder