bianbian

入手自行车头盔一枚

2011.10.26

最近夜长了,下班的时候天都黑了,小自行车的上管又有点松动,骑车的时候心惊胆颤的.
于是买了个自行车头盔.

Ranking Helmet - TAI

  • 产品名称:TAI
  • 产品类别: TAI(鈦)/H72
  • 规 格:Double-In-Mould
  • 孔 位:15
  • 重 量:215g
  • 尺 寸:58-61cm

有了头盔,腰不酸了,腿不疼了,一屁上五楼!

头盔是骑行必备装备呀,澳大利亚都立法骑行必须戴头盔,咱也跟人家学着点.有了头盔也骑车不能大意,那些路上不长眼的,不要命的.艹

apache asia roadshow 2011

2011.10.26

最早在iteye看到Roadshow的消息,赶紧去网站上报了名(搞不清为撒这种网站都要被墙,方校长,干你妹)

今年的Roadshow在上大举行,2011-10-23,开始前几天传出座位紧张的消息,当天到的时候上座率却没那么足.
Roadshow分为上下午两部分,上午的lecturer都是重量级人物:

Gren Stein, Apache Board of Directors, Former chairman, Contributing to Apache,讲自己是怎么一步步加入Apache

Greg Stein

Aaron Farr, Former Apache Board of Directors, Understanding open source lincense,这个老外会讲中文:D

Todd kaplinger, Lead architect, IBM Mobile Technology, Building Mobile Applications with PhoneGap, 听这场的时候睡着了…

中午在食堂吃饭,不表.

下午分几个Track,挑几场听了听,有几个就是厂商的软广告啊,不过这几个Tool还都蛮不错的:Dorado,Maqetta

还听HP和IBM的几个同学讲了下用Apache的lib做的产品,MainfoldCF, Hadoop. 还了解到IBM有专门的Team来贡献OpenJDK的代码,估计其它公司也有的吧,Open Source原来是这样的.
晚上还有跟lecturer们喝茶的活动,不过还有别的事,就先撤了.

Open Source真是个神奇的东西,那么多人免费为社区劳动,提供高质量的Free Software,为商业和社区都做出了不可估量的贡献.
Apache的项目真的好多,我想如果能全部了解一遍的话,你一定会成为一个好的architecture:)

amazon s3 virtual hosting and access control

2011.09.03

When you first come into Amazon S3AWS Management Console provide a convent way to manage your s3 resource, including create bucket, upload object, view or download object.

But you must need another way to access your s3 objects, S3 provide a REST API let you access them, using HTTP protocol

  • http://s3-us-west-1.amazonaws.com/bucknetname
  • http://bucketname.s3.amazonaws.com
  • http://img.example.com

The first two way are build in with amazon s3, you need no configuration on them.

The 3rd way, which let you access your s3 object under your domain name, it’s powerfull, but need a little config: First, create a bucket named as your domain name, such as “img.example.com”, then configure your DNS name  ”img.example.com” as a CNAME alias for “img.example.com.s3.amazonaws.com”. then you can access your bucket which named “img.example.com” through http://img.example.com! Note: the bucket name must be the same as the CNAME

You just know how to access your s3 resources, but before you can do that, you still need config who can access it. You may don’t want everyone can do that, bcs this may cause you pay extra dollars :-(

Bucket Policies can do that! For example, you just want your website www.example.com but no ohters can use your picture hosted at s3, you can use the “aws:Referer” to do that:

{
	"Version": "2008-10-17",
	"Id": "your-uniqueness-id",
	"Statement": [
		{
			"Sid": "Allow get requests referred by example.com",
			"Effect": "Allow",
			"Principal": "*",
			"Action": "s3:GetObject",
			"Resource": "arn:aws:s3:::img.example.com/*",
			"Condition": {
				"StringLike": {
					"aws:Referer": "http://www.example.com/*"
				}
			}
		}
	]
}

There are other key to use: “aws:SourceIp”, “aws:UserAgent” etc. Read Element Descriptions for more.

Future Reading:
How do I make requests
How do I manage access to my resources

« Previous Next »