<body>

Caiwangqin's blog

Focus on Web2.0, Business, Architecture, Agile, Technic and beyond…

This blog has moved

2010年3月8日 星期一


This blog is now located at http://blog.caiwangqin.com/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://blog.caiwangqin.com/feeds/posts/default.
posted by Caiwangqin, 下午12:17 | Permalink

Rails 3 : Cool New Things but not ready

2010年2月6日 星期六

Check out this SlideShare Presentation:

Read more: http://chinaonrails.com/topic/view/3671.html
posted by Caiwangqin, 下午12:59 | Permalink

Goodbye to 2009

2009年12月30日 星期三

在哒哒的键盘声中,2009就又从指缝中溜走了。生活中的改变很大,因为结婚了,工作中值得纪念的事很少,因为表面上平淡无奇。很无奈的是在北京过了近3年仍在创业的初级阶段,很欣慰的是看到妹妹这两年进步很多。时不可兮骤得,聊逍遥兮容与。

主要作品:
新版本 P1.cn (ROR + PHP)。

难忘的经历:
1. Beta 技术沙龙 at 奇遇花园咖啡馆 
2. Beijing open party at Thoughtworks Beijing Office
3. BeijingonRails at Seravia Beijing Office

生活状况:
朝外SOHO,生活和工作基本在北京东三环京广桥的东西两侧。

走过的城市:
北京,深圳,武汉,浠水

游过的景点:
恭王府,颐和园,深圳大梅沙

最常用的网站:
1. Gmail
2. P1.cn
3. Twitter(Dabr, Twidroid)
4. Google Search(Not 谷歌)
5. Google Reader
6. Google Docs
7. Dict.cn

读过的书:
《把时间当朋友》,《藏地密码》,《盗墓笔记》,《股票基础知识》,《货币长城》...

最爱的音乐:
这一年基本没有更新我的音乐库,偶乐听一下还都是老歌。

印象深刻的影视:
深圳益田假日广场:博物馆奇妙夜2(Night at the Museum 2)
北京万达国际电影城:2012

使用的手机:
Google G1 (CyanogenMod v4.2.10.1),准备入手Nexus.

posted by Caiwangqin, 上午11:09 | Permalink

P1 Jobs

2009年12月28日 星期一

Marketing/sales planner:

 

Good communication skill, copywriting skill in Chinese and English

Good on PPT design

Experience in digital marketing or social media marketing is a plus

 

Sales Manager广告销售经理

 

Marketing communication/sales background

Good communication skill

Responsible, fast-learner, team worker

English skill and experience in online community ad sales is a plus

 

Sales Director Shanghai 广告销售总监(上海)

 

5-6 years experience in online community ad sales, 2-3 years in director level position

Good communication skill in Chinese and English

 

User Interface Designer(北京)

 

We are looking for an experienced designer with an eye for perfection.

You need to have a profound understanding about brand image, and how to communicate it through your designs.

We prefer if you have previous experience in doing luxury or fashion related work.

You also need a strong understanding of usability and user experience.

You are highly proficient in Photoshop and preferably also in Illustrator.

Good verbal communication skills in both Chinese and English is heavily appreciated.



If you are interested don't hesitate to contact our HR department at +86 10 5820 1090 or send your CV to hr@p1.cn for more information and book time for an interview.

标签:

posted by Caiwangqin, 下午2:33 | Permalink

Merry Christmas & Happy New Year!

2009年12月24日 星期四


xmas-card-red, originally uploaded by caiwangqin.

标签:

posted by Caiwangqin, 上午11:35 | Permalink

BeijingonRails 小记

2009年12月21日 星期一

上周六(2009-12-19),我们在Seravia北京的办公室,举行了一期BeijingonRails小聚。到场的30多人基本都是Rails程序员,这应该是2009年北京最后的一次Rails聚会活动了。小记:

1. Seravia 北京的Office是一个很好的Party地点。
2. Seravia 在使用TeX/LaTeX生成PDF,和修改PDF上做了很多工作,使用openssl加密签名,S3存储。
3. 郑柯从A~Z介绍了Joyent Accelerator是什么,暂还未透露P(价格)。
4. WPC的JCR(Java content repository)的演示很酷,JCR在某些领域应该是很有用的东西。
5. 财帮子/IN-SRC三人团队全部来参与了活动,Rails三人团队是最完美的。
6. 饭桶网即将上线Rails重写的餐厅页面,有计划正逐渐越来越多的使用Rails.
7. @taiwen, @郑柯 的乒乓球和我在同一水平。
8. 现场PPT分享: http://www.slideshare.net/tag/beijingonrails
9. 现在大家都习惯了Twitter分享信息,写Blog的越来越少了,更多信息请使用Twitter搜索#BeijingonRails:http://twa.sh/search?query=beijingonrails 

posted by Caiwangqin, 下午4:11 | Permalink

Encrypt with Ruby decrypt in PHP

2009年12月16日 星期三

Ruby encrypt decrypt

http://coderay.rubychan.de/rays/show/6287



 




require 'openssl'

require 'base64'

def encipher(data_to_encode)

cipher = OpenSSL::Cipher::Cipher.new("des-ede3-cbc")

key = "secretkey"

cipher.encrypt(key)

encoded_data = cipher.update(data_to_encode)

encoded_data cipher.final

return Base64.encode64(encoded_data)

end

def decipher(encoded)

encoded = Base64.decode64(encoded)



cipher = OpenSSL::Cipher::Cipher.new("des-ede3-cbc")

key = "secretkey"

cipher.decrypt(key)

encoded_data = cipher.update(encoded)

encoded_data cipher.final

return encoded_data

end

 



PHP encrypt decrypt

http://coderay.rubychan.de/rays/show/6288



 




function getkeyiv($key_size, $iv_size, $key, $iv='') {

if ($iv == '') {

$iv = 'OpenSSL for Ruby rulez!';

}

$iv = substr($iv,0,$iv_size);



$gen = '';

do {

$gen = $gen.md5($gen.$key.$iv,true);

} while (strlen($gen)($iv_size+$key_size));

$o[0] = substr($gen,0,$key_size);

$o[1] = $iv; //this is not the generated IV,

//just the original "salt" cut to the required size

return $o;

}

function trimpadding($str) {

if (ord($str[strlen($str)-1]) 9) {

return rtrim($str,$str[strlen($str)-1]);

} else {

return $str;

}

}

function encipher($data_to_encode){

$key = 'secretkey';



$td = mcrypt_module_open(MCRYPT_TRIPLEDES, '', MCRYPT_MODE_CBC, '');

$iv_size = mcrypt_enc_get_iv_size($td);

$key_size = mcrypt_enc_get_key_size($td);

$genkey = getkeyiv($key_size, $iv_size,$key);

if (mcrypt_generic_init($td,$genkey[0],$genkey[1]) != -1) {

$encoded_data = mcrypt_generic($td, $data_to_encode);

}

mcrypt_generic_deinit($td);

mcrypt_module_close($td);

return base64_encode($encoded_data);

}

function decipher($encoded) {

$key = 'secretkey';

$decrypted='';

$enc = base64_decode($encoded);

$td = mcrypt_module_open(MCRYPT_TRIPLEDES, '', MCRYPT_MODE_CBC, '');

$iv_size = mcrypt_enc_get_iv_size($td);

$key_size = mcrypt_enc_get_key_size($td);

$genkey = getkeyiv($key_size, $iv_size,$key);

if (mcrypt_generic_init($td,$genkey[0],$genkey[1]) != -1) {

$decrypted = mdecrypt_generic($td, $enc);

}

mcrypt_generic_deinit($td);

mcrypt_module_close($td);

return trimpadding($decrypted);

}

?>

 

 

标签: , , ,

posted by Caiwangqin, 下午5:26 | Permalink