突然发现,原来,博客离10W又进了一点。多少年了。。。终于又要重入10W内了。。
先上个图,预祝一下,等确实定了之后,再来上图。。。

很激动人心的图哦【忘了说了,主域名是指:www.neatstudio.com,neatcn.com还没有到呢。。。】
Submitted by gouki on 2009, November 10, 1:02 PM
突然发现,原来,博客离10W又进了一点。多少年了。。。终于又要重入10W内了。。
先上个图,预祝一下,等确实定了之后,再来上图。。。

很激动人心的图哦【忘了说了,主域名是指:www.neatstudio.com,neatcn.com还没有到呢。。。】
Submitted by gouki on 2009, November 9, 11:40 AM
在某人的小说站上线前,答应帮他做点链接
说起小说,突然想起读书时代流传的陋室铭改篇中的一段:小说翻的快,杂志阅的勤,斯是教室,唯吾闲清
自己读书的时候,也是被小说害的呀。天天上课就是看小说,眼睛也是那时候看坏的。。。。
在如今,你闲下来的时候,能干什么?永远播不完的肥皂剧?无聊恶搞的娱乐节目?还是不知所云的走进科学 ?或者在QQ等IM上聊天打屁?
我是用手机上网看看小说,电视几乎不看了,即使要看也是几乎只看discover之类的,上海就是纪实频道了。。。
其它还真没劲。
网上几个看小说的网站:
起点:www.qidian.com
幻剑:www.hjsm.net
爱书吧: www.ishu8.net
Submitted by gouki on 2009, November 8, 7:53 AM
一直以来,听到的都是企业文化,难得听到这种所谓的工程师文化。
但在技术型企业,工程师却是占有企业员工大部分的比例,再加上facebook又是非常成功的一个产品,因此,转载一下学习一下。
以下内容来自:http://feedproxy.google.com/~r/hutuworm/~3/YJ-W-K3A4DM/facebook.html
Windows Live 网站有位工程师,参加了 Facebook 组织的 Facebook Seattle Engineering Road Show 活动,回来之后兴奋不已,洋洋洒洒写了一大篇,介绍 Facebook 在不断扩张过程中获得的一些经验:Facebook Seattle Engineering Road Show: Mike Shroepfer on Engineering at Scale at Facebook
大家都会英文,这里不作全文翻译了。值得一提的是 Facebook 自己总结的工程师文化:
1. 快速前进打破陈规(Move Fast and Break Things) - 鼓励员工承担风险,愿意为创新牺牲一些稳定性。工程师厌恶风险往往是公司衰败之始。
2. 小团队办大事(Huge Impact with Small Teams)- 多数功能系统都由一到三位工程师组成的小团队完成。Facebook 每位工程师服务 120 万名用户 v.s. Google 1:190,000 v.s. Amazon 1:96,000 v.s. Microsoft 1:75,000。
3. 大胆创新(Be Bold and Innovative) - 不言自明。
Facebook 连扫地的都算上也只有 900 多名员工,其中工程师只有 230 余人。他们的用户近 3 亿,接近于美国人口总数。他们有 3 万台服务器,存储着 800 亿张图片,每天承受 10 亿次搜索,Memcache 集群每秒操作 5 千万次,每秒下载照片 120 万张......
什么叫海量?这就是海量!
如果没有这样的工程师文化,肯定无法支持海量。
Submitted by gouki on 2009, November 6, 9:04 PM
CDN这个东西,当然是个好东西。。。所以看到有FAQ就理所当然的复制下来,其实,最近我突然想到一件事情,中国的地区域名还有一个很有意思的地域域名,那就是js.cn,所以,我悄悄的申请了两个域名,cache.js.cn和cdn.js.cn,就是想用来做这种CDN转发,当然,只是简单的。。。
我最初的想法是(有一小部分),如果我的服务器里有N多人装了DZ论坛,那么这些JS和CSS其实都是共用的。如果我都用同样的域名进行转发,那,其实节约了很多空间,也节约了带宽。因为同一个域名出来的JS和CSS文件,理论上是应该被缓存的哦。。
以下内容就是FAQ,自己也学习一下。。。
1.CDN加速原理
通过动态域名解析,网友的请求被分配到离自己最快的服务器。CDN服务器直接返回缓存文件或通过专线代理原站的内容。
网络加速+内容缓存,有效提供访问速度
2.CDN节点数量
全国多个机房,每个机房多台服务器,CDN节点一般上百台
3.CDN缓存什么内容
缓存html、图片、css、xml等静态资源,不缓存含有?的动态地址、jsp、php,js文件也不缓存【除非特殊设置】
缓存原站返回HTTP状态为20*或304,不缓存其他状态(例如404,500,503)
4.CDN缓存内容的更新
a)用户首次请求,CDN从原站抓取后缓存,直到文件过期后有用户请求再次更新
b)程序主动通知CDN抓取
5.CDN缓存内容的有效期
a)原站apache吐出的静态文件:由apache的expire和header模块控制
主要两项:last-modified,cache-control:max-age
apache缺省配置,所有静态文件在cdn只缓存3600s【需要我们按需求调整被加速服务器的apache设置】
3600s后cdn失效,用户访问时会重新请求原站,如果没有变化,缓存失效周期自动延长10%。
b)原站jsp或php吐出的动态内容(url形式必须是静态的)
由程序控制last-modified,cache-control:max-age public ,apache的设置将不起作用
cdn根据这两项判断是否需要到原站更新内容
6.CDN和应用的结合策略
a)变化不频繁的页面:例如图吧的图片显示页、车型页、已结束的比赛对阵页
在原站生成静态页面,原站apache上定义过期时间,例如1天。
原站上静态文件更新后,可以等待cdn过期。或者主动通知cdn更新(随着cdn节点越来越多,代价会非常高)
b)变化频繁的页面:例如足球库中的及时亚盘、及时欧赔、正在进行的比赛对阵页
不生成静态页面,由jsp或php定义过期时间,例如5s或60s。cdn过期后,如果有用户访问就从原站上抓取。
优点:相关页面内容更新后,不需要主动通知100个原站都来抓取,有效降低原站的压力。
如果页面内容没有变化,返回lastmodified不变,这样原站会直接返回304给cdn,cdn也会返回304给用户。减少网络传输和速度
比赛结束后,“正在进行的比赛对阵页”转换为第一类情况,再生成静态文件
c)特殊静态资源:例如图片库和某些大型产品库中的评论js
或者频繁访问、频繁更新的页面:例如足球赛事库的及时比分文件
通过apache nocache告诉IE不缓存,html中就不需要使用pinglun.js?123456这样的代码形式
然后用max-age告诉cdn缓存1s,这样避免每次用户请求都转到原站
本文来源:http://71j.cn/archives/10
Submitted by gouki on 2009, November 6, 8:56 PM
原文的来源是一国外网站,而我当然就不是了。。转载,转载而己。
其实,如果用过apache的人,应该知道 ,在conf目录下,会有一个mimetype文件,里面其实就是一个对应表,当然,或许不全,但更当然的是,没有注释说明,只能自己凭感觉猜测了。。
既然有一个现成的,那当然还是备份下来以做参考:
| 描述 | 文件扩展名 | MIME 类型 | |
| Text and Text-Related Types | |||
| HTML text data (RFC 1866) | html htm | text/html | |
| Plain text: documents; program listings | txt c c++ pl cc h | text/plain | |
| Richtext (obsolete – replaced by text/enriched) | text/richtext | ||
| Structure enhanced text | (etx?) | text/x-setext | |
| Enriched text markup (RFC 1896) | text/enriched | ||
| Tab-separated values (tabular) | (tsv?) | text/tab-separated-values | |
| SGML documents (RFC 1874) | text/sgml | ||
| Speech synthesis data (MVP Solutions) | talk | text/x-speech | |
| Document Stylesheet Types | |||
| Cascading Stylesheets | css | text/css | |
| DSSSL-online stylesheets | application/dsssl (proposed) | ||
| Image Types | |||
| GIF | gif | image/gif | |
| X-Windows bitmap (b/w) | xbm | image/x-xbitmap | |
| X-Windows pixelmap (8-bit color) | xpm | image/x-xpixmap | |
| Portable Network Graphics | png | image/x-png | |
| Image Exchange Format (RFC 1314) | ief | image/ief | |
| JPEG | jpeg jpg jpe | image/jpeg | |
| TIFF | tiff tif | image/tiff | |
| RGB | rgb | image/rgb | |
| image/x-rgb | |||
| Group III Fax (RFC 1494) | g3f | image/g3fax | |
| X Windowdump format | xwd | image/x-xwindowdump | |
| Macintosh PICT format | pict | image/x-pict | |
| PPM (UNIX PPM package) | ppm | image/x-portable-pixmap | |
| PGM (UNIX PPM package) | pgm | image/x-portable-graymap | |
| PBM (UNIX PPM package) | pbm | image/x-portable-bitmap | |
| PNM (UNIX PPM package) | pnm | image/x-portable-anymap | |
| Microsoft Windows bitmap | bmp | image/x-ms-bmp | |
| CMU raster | ras | image/x-cmu-raster | |
| Kodak Photo-CD | pcd | image/x-photo-cd | |
| Computer Graphics Metafile | cgm | image/cgm | |
| North Am. Presentation Layer Protocol | image/naplps | ||
| CALS Type 1 or 2 | mil cal | image/x-cals | |
| Fractal Image Format (Iterated Systems) | fif | image/fif | |
| QuickSilver active image (Micrografx) | dsf | image/x-mgx-dsf | |
| CMX vector image (Corel) | cmx | image/x-cmx | |
| Wavelet-compressed (Summus) | wi | image/wavelet | |
| AutoCad Drawing (SoftSource) | dwg | image/vnd.dwg | |
| image/x-dwg | |||
| AutoCad DXF file (SoftSource) | dxf | image/vnd.dxf | |
| image/x-dxf | |||
| Simple Vector Format (SoftSource) | svf | image/vnd.svf | |
| also vector/x-svf | |||
| Audio/Voice/Music Related Types | |||
| “basic”audio – 8-bit u-law PCM | au snd | audio/basic | |
| Macintosh audio format (AIpple) | aif aiff aifc | audio/x-aiff | |
| Microsoft audio | wav | audio/x-wav | |
| MPEG audio | mpa abs mpega | audio/x-mpeg | |
| MPEG-2 audio | mp2a mpa2 | audio/x-mpeg-2 | |
| compressed speech (Echo Speech Corp.) | es | audio/echospeech | |
| Toolvox speech audio (Voxware) | vox | audio/voxware | |
| RapidTransit compressed audio (Fast Man) | lcc | application/fastman | |
| Realaudio (Progressive Networks) | ra ram | application/x-pn-realaudio | |
| NIFF music notation data format | application/vnd.music-niff | ||
| MIDI music data | mmid | x-music/x-midi | |
| Koan music data (SSeyo) | skp | application/vnd.koan | |
| application/x-koan | |||
| Speech synthesis data (MVP Solutions) | talk | text/x-speech | |
| Video Types | |||
| MPEG video | mpeg mpg mpe | video/mpeg | |
| MPEG-2 video | mpv2 mp2v | video/mpeg-2 | |
| Macintosh Quicktime | qt mov | video/quicktime | |
| Microsoft video | avi | video/x-msvideo | |
| SGI Movie format | movie | video/x-sgi-movie | |
| VDOlive streaming video (VDOnet) | vdo | video/vdo | |
| Vivo streaming video (Vivo software) | viv | video/vnd.vivo | |
| video/vivo | |||
| Special HTTP/Web Application Types | |||
| Proxy autoconfiguration (Netscape browsers) | pac | application/x-ns-proxy-autoconfig | |
| See Chapter 6 | application/x-www-form-urlencoded | ||
| See Chapter 9 | application/x-www-local-exec | ||
| See Chapter 9 (Netscape extension) | multipart/x-mixed-replace | ||
| See Chapter 9 and Appendix B | multipart/form-data | ||
| Netscape Cooltalk chat data (Netscape) | ice | x-conference/x-cooltalk | |
| Interactive chat (Ichat) | application/x-chat | ||
| Application Types | |||
| Text-Related | |||
| PostScript | ai eps ps | application/postscript | |
| Microsoft Rich Text Format | rtf | application/rtf | |
| Adobe Acrobat PDF | application/pdf | ||
| application/x-pdf | |||
| Maker Interchange Format (FrameMaker) | mif | application/vnd.mif | |
| application/x-mif | |||
| Troff document | t tr roff | application/x-troff | |
| Troff document with MAN macros | man | application/x-troff-man | |
| Troff document with ME macros | me | application/x-troff-me | |
| Troff document with MS macros | ms | application/x-troff-ms | |
| LaTeX document | latex | application/x-latex | |
| Tex/LateX document | tex | application/x-tex | |
| GNU TexInfo document | texinfo texi | application/x-texinfo | |
| TeX dvi format | dvi | application/x-dvi | |
| MacWrite document | ?? | application/macwriteii | |
| MS word document | ?? | application/msword | |
| WordPerfect 5.1 document | ?? | application/wordperfect5.1 | |
| SGML application (RFC 1874) | application/sgml | ||
| Office Document Architecture | oda | application/oda | |
| Envoy Document | evy | application/envoy | |
| Wang Info. Tranfer Format (Wang) | application/wita | ||
| DEC Document Transfer Format (DEC) | application/dec-dx | ||
| IBM Document Content Architecture (IBM) | application/dca-rft | ||
| CommonGround Digital Paper (No Hands Software) | application/commonground | ||
| FrameMaker Documents (Frame) | doc fm frm frame | application/vnd.framemaker | |
| application/x-framemaker | |||
| Remote printing at arbitrary printers (RFC 1486) | application/remote-printing | ||
| Archive/Compressed Archives | |||
| Gnu tar format | gtar | application/x-gtar | |
| 4.3BSD tar format | tar | application/x-tar | |
| POSIX tar format | ustar | application/x-ustar | |
| Old CPIO format | bcpio | application/x-bcpio | |
| POSIX CPIO format | cpio | application/x-cpio | |
| UNIX sh shell archive | shar | application/x-shar | |
| DOS/PC – Pkzipped archive | zip | application/zip | |
| Macintosh Binhexed archive | hqx | application/mac-binhex40 | |
| Macintosh Stuffit Archive | sit sea | application/x-stuffit | |
| Fractal Image Format | fif | application/fractals | |
| Binary, UUencoded | bin uu | application/octet-stream | |
| PC executable | exe | application/octet-stream | |
| WAIS “sources” | src wsrc | application/x-wais-source | |
| NCSA HDF data format | hdf | application/hdf | |
| Downloadable Program/Scripts | |||
| Javascript program | js ls mocha | text/javascript | |
| application/x-javascript | |||
| VBScript program | text/vbscript | ||
| UNIX bourne shell program | sh | application/x-sh | |
| UNIX c-shell program | csh | application/x-csh | |
| Perl program | pl | application/x-perl | |
| Tcl (Tool Control Language) program | tcl | application/x-tcl | |
| Atomicmail program scripts (obsolete) | application/atomicmail | ||
| Slate documents – executable enclosures (BBN) | application/slate | ||
| Undefined binary data (often executable progs) | application/octet-stream | ||
| RISC OS Executable programs (ANT Limited) | application/riscos | ||
| Animation/Multimedia | |||
| Andrew Toolkit inset | application/andrew-inset | ||
| FutureSplash vector animation (FutureWave) | spl | application/futuresplash | |
| mBED multimedia data (mBED) | mbd | application/mbedlet | |
| Macromedia Shockwave (Macromedia) | application/x-director | ||
| Sizzler real-time video/animation | application/x-sprite | ||
| PowerMedia multimedia (RadMedia) | rad | application/x-rad-powermedia | |
| Presentation | |||
| PowerPoint presentation (Microsoft) | ppz | application/mspowerpoint | |
| PointPlus presentation data (Net Scene) | css | application/x-pointplus | |
| ASAP WordPower (Software Publishing Corp.) | asp | application/x-asap | |
| Astound Web Player multimedia data (GoldDisk) | asn | application/astound | |
| Special Embedded Object | |||
| OLE script e.g. Visual Basic (Ncompass) | axs | application/x-olescript | |
| OLE Object (Microsoft/NCompass) | ods | application/x-oleobject | |
| OpenScape OLE/OCX objects (Business@Web) | opp | x-form/x-openscape | |
| Visual Basic objects (Amara) | wba | application/x-webbasic | |
| Specialized data entry forms (Alpha Software) | frm | application/x-alpha-form | |
| client-server objects (Wayfarer Communications) | wfx | x-script/x-wfxclient | |
| General Applications | |||
| Undefined binary data (often executable progs) | application/octet-stream | ||
| CALS (U.S. D.O.D data format – RFC 1895) | application/cals-1840 | ||
| Pointcast news data (Pointcast) | pcn | application/x-pcn | |
| Excel spreadsheet (Microsoft) | application/vnd.ms-excel | ||
| application/x-msexcel | |||
| application/ms-excel | |||
| PowerPoint (Microsoft) | ppt | application/vnd.ms-powerpoint | |
| application/ms-powerpoint | |||
| Microsoft Project (Microsoft) | application/vnd.ms-project | ||
| Works data (Microsoft) | application/vnd.ms-works | ||
| MAPI data (Microsoft) | application/vnd.ms-tnef | ||
| Artgallery data (Microsoft) | application/vnd.artgalry | ||
| SourceView document (Dataware Electronics) | svd | application/vnd.svd | |
| Truedoc (Bitstream) | application/vnd.truedoc | ||
| Net Install – software install (20/20 Software) | ins | application/x-net-install | |
| Carbon Copy – remote control/access (Microcom) | ccv | application/ccv | |
| Spreadsheets (Visual Components) | vts | workbook/formulaone | |
| Cybercash digital money (Cybercash) | application/cybercash | ||
| Format for sending generic Macintosh files | application/applefile | ||
| Active message — connect to active mail app. | application/activemessage | ||
| X.400 mail message body part (RFC 1494) | application/x400-bp | ||
| USENET news message id (RFC 1036) | application/news-message-id | ||
| USENET news message (RFC 1036) | application/news-transmission | ||
| Multipart Types (mostly email) | |||
| Messages with multiple parts | multipart/mixed | ||
| Messages with multiple, alternative parts | multipart/alternative | ||
| Message with multiple, related parts | multipart/related | ||
| Multiple parts are digests | multipart/digest | ||
| For reporting of email status (admin.) | multipart/report | ||
| Order of parts does not matter | multipart/parallel | ||
| Macintosh file data | multipart/appledouble | ||
| Aggregate messages; descriptor as header | multipart/header-set | ||
| Container for voice-mail | multipart/voice-message | ||
| HTML FORM data (see Ch. 9 and App. B) | multipart/form-data | ||
| Infinite multiparts – See Chapter 9 (Netscape) | multipart/x-mixed-replace | ||
| Message Types (mostly email) | |||
| MIME message | message/rfc822 | ||
| Partial message | message/partial | ||
| Message containing external references | message/external-body | ||
| Message containing USENET news | message/news | ||
| HTTP message | message/http | ||
| 2D/3D Data/Virtual Reality Types | |||
| VRML data file | wrl vrml | x-world/x-vrml(changing to model/vrml) | |
| WIRL – VRML data (VREAM) | vrw | x-world/x-vream | |
| Play3D 3d scene data (Play3D) | p3d | application/x-p3d | |
| Viscape Interactive 3d world data (Superscape) | svr | x-world/x-svr | |
| WebActive 3d data (Plastic Thought) | wvr | x-world/x-wvr | |
| QuickDraw3D scene data (Apple) | 3dmf | x-world/x-3dmf | |
| Scientific/Math/CAD Types | |||
| Chemical types — to communicate information about chemical models | chemical/* (several subtypes) | ||
| Mathematica notebook | ma | application/mathematica | |
| Computational meshes for numerical simulations | msh | x-model/x-mesh(evolving to model/mesh) | |
| Vis5D 5-dimensional data | v5d | application/vis5d | |
| IGES models — CAD/CAM (CGM) data | igs | application/iges(evolving to model/iges?) | |
| Autocad WHIP vector drawings | dwf | drawing/x-dwf | |
| Largely Platform-Specific Types | |||
| Silicon Graphics Specific Types | |||
| Showcase Presentations | showcase slides sc sho show | application/x-showcase | |
| Insight Manual pages | ins insight | application/x-insight | |
| Iris Annotator data | ano | application/x-annotator | |
| Directory Viewer | dir | application/x-dirview | |
| Software License | lic | application/x-enterlicense | |
| Fax manager file | faxmgr | application/x-fax-manager | |
| Fax job data file | faxmgrjob | application/x-fax-manager-job | |
| IconBook data | icnbk | application/x-iconbook | |
| ? | wb | application/x-inpview | |
| Installable software in ‘inst’ format | inst | application/x-install | |
| Mail folder | application/x-mailfolder | ||
| ? | pp ppages | application/x-ppages | |
| Data for printer (via lpr) | sgi-lpr | application/x-sgi-lpr | |
| Software in ‘tardist’ format | tardist | application/x-tardist | |
| Software in compressed ‘tardist’ format | ztardist | application/x-ztardist | |
| WingZ spreadsheet | wkz | application/x-wingz | |
| Open Inventor 3-D scenes | iv | graphics/x-inventor | |
来源:http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html
我的来源就比较简单了:http://71j.cn/archives/21