IceskYsl@1sters!

程序员…

为了不忘却的Google记忆

北京时间2010年凌晨3点半,还没睡,看到Google Buzz里有人喊“还没睡的赶紧来见证这一刻,一辈子只有这么一次”,得知Google宣布了最终的决定,退出大陆市场,转战香港,这其实不像老美能想的出来的招,哪位高人指点过Google?
网上充裕着无数的论调和舆论,早就不能相信所谓的媒体和舆论,我们有着自己的思维和判断力,也无需辩论是非,也别抱着任何期盼!多了一份麻木,学会淡定,再淡定!
其实我很少用Google.cn,我生活在互联网,我的互联网没有国界~为了不忘却这个特殊的纪念日,我还是呢喃一篇,不要忘却Google的记忆!

以前有听人说过电线的天翼工厂(天翼空间)是华为和中兴搭建的,其APIs的好棒~今天得闲,过去看了一眼,第一眼看上去,确实很不错,点了几个仔细看了看后发现其实只是一个面子工程,华丽的外表下没有多少实质性的东西,不外乎就是把市面上可以看到的API仔细的罗列了一边基本信息(和古老的公司黄页有点想象),但是其连基本信息都没提供全,越看越觉得差劲!
APIs的价值在哪里?不外乎是提供数据接口,进而指导开发者进行开发和实战,最终能培养开发者,产生好的内容(应用),但是这是一个从基础开始的过程,需要不断的培养和引导,但是你罗列一堆apis价值在哪里,不外乎可以给领导看上去量大,多!呵呵,KPI?
我们后面也会做这个方面的事情,但是我们思路肯定和这个不一样,切入点也不一样,我们会从一个或者几个API开始,这些API需要是成熟的,或者实际自己可控的,对开发者进行1-3轮的培养,让其熟悉这个概念和使用流程,然后还会总结开发一些通用的jar包简化开发,然后再引入其他第三方的apis,这个时候才是积累出成果的时候,天翼工厂的做法很急功近利!仔细分析,也是不难理解的,他们缺少大量的开发者,不像eoe已经通过教程,eoeAndroid社区和开发者建立了很良好的信任关系,可以持续的培养和引导,这也就是eoe做的优势所在,如果我们开始做,一定做的比天翼好,而且我们做出来后,其产品可以在eoeMarket里直接发布,推荐~

MySQL CONCAT

MySQL CONCAT function is used to concatenate two strings to form a single string. Try out following example:
mysql> SELECT CONCAT(‘FIRST ‘, ‘SECOND’);
+—————————-+
| CONCAT(‘FIRST ‘, ‘SECOND’) |
+—————————-+
| FIRST SECOND |
+—————————-+
1 row in set (0.00 sec)

ie.
mysql -u eoewallpapers -p123456123 wallpapers -e ‘set names ‘utf8′; select CONCAT(base_url,”400″,title) from photos where state > 10 ‘ > photos_400.txt

1sters.com域名成功转出到Godaddy

终于收到邮件:

Congratulations! The transfer request for the following domain name(s) has been completed:
1STERS.COM

历尽很多次的交涉,希望和失望,气愤和感慨,我的域名1sters.com终于转出到Godaddy了,终于有了一个满意的结果。
期间发生了很多事情,大致提几个,域名开始是在万网的一个三级代理(之前网上认识的一个朋友)注册的,而他是在一个很不正规的,不靠谱的二级代理商注册的;后来我这个朋友不怎么上网,我差点续费无门丢失域名,还好联系到要到了他的三级代理的帐号,才一直在那个二级代理那边续费一直使用到今天。
但是越来越觉得不安全(从代理那边可以做任何事情),于是一直想转出,查了N多资料后得到的结论是:万网不是一个好说话的主,转出手续复杂的很。像我这个在代理注册的还得线转回万网,才可以办理转出手续,转出手续中包括邮寄N多证明材料,无语。
过程很复杂,我从开始操作得时候记录过一个Doc文档,内容很精彩,但是比较杂乱,等我有空了整理出来,这里说几个关节点:
1. 万网要求我必须将找注册得那个代理商将域名转回到万网我自己得ID上才可以办理转出;
2. 代理商以这个为理由,要收我200块钱手续费(BS一下),被我以正规理由否决后,立马提价到400,hoho,不欢而散(我肯定会说要投诉他)。
3.两边踢皮球,我没抱太大希望,一边寻找好得域名重新注册,一方面看是否又其他途径解决问题;
4.然后发现很多人提到可以去ICAAN投诉万网,于是按照网上得投诉范本,投诉了一次;
5.然后就被其他事忙忘了,自然我也注册了新得域名(ysler.com)备用;
6.N天后收到那个代理商转来得邮件,惊奇得发现投诉起作用了,ICAAN找了万网麻烦,万网就去找那个代理商得麻烦,以为代理商投诉得,自然最后就找到了我;
7.万网要我和代理商协调转回到万网,再给我办转出,协调结果,代理商坚持要我给100元手续费,再次被我否决,再次不欢而散;
8.我给万网和代理商发了邮件,阐述问题,并告诉他们如果在这样踢皮球得话,我会一直去ICCAN投诉(后来没时间投诉了,呵呵)
9.过了几天,邮件貌似生效了,万网一个客服给我邮件,发来了转移密码(我也没邮件身份证明材料等);
10.喜,感觉去Godaddy办理转入(之前办理过一次,被万网拒绝转出了),然后给万网发邮件,说我得转出申请已经提交,尽快给我通过。
11.收到万网回复,说已经通过,13后将生效,然后等到14号发现还没成功,给Godaddy得support一封邮件,问问是咋回事;
12.不得不说,Godaddy得服务号很多,立即帮我查了原因,并告诉我现在需要5-7天得时间才能转过去;
13.再等,今天16号终于收到Godaddy的转出成功通知邮件,这个域名我终于放心了。

故事的梗概就是这样,期间很多次的交涉很有意思的,以后再分享,这里得出几个结论:
1.万网的很多手续都是人为设置的障碍;
2.万网很惧ICAAN的;
3.万网的服务质量提高了不少,但是还需要摆好心态,把自己的口碑做上去,现在的口碑很差了;
4.代理商的诸多的手续费之类的坚决不低头,不合理的就不给;
5.交涉过程需要做好功课,做到有理有据

Setup Redmine to send email using GMail

Redmine是用Rails写的一套很不错的项目管理系统,其提供了诸多很方便实用的功能,诸如里程碑管理,BUG跟踪,代码库变更管理等等。
搭建以后在管理面板中测试邮件不通,主要原因是由于采用的Gmail的邮箱,于是找到一些解决方案,如下:
1. Install the action_mailer_optional_tls plugin
The action_mailer_optional_tls_plugin adds a TLS option to Redmine’s emailing library, ActionMailer. TLS is a version of SSL which is required by GMail in order to send email.

To install this plugin, use the script/plugin command in your Redmine directory:
./script/plugin install git://github.com/collectiveidea/action_mailer_optional_tls.git

2. Configure your email.yml
# File: config/email.yml
production:
delivery_method: :smtp
smtp_settings:
tls: true
address: “smtp.gmail.com”
port: 587
domain: “www.YOURDOAMIN.com” # ‘your.domain.com’ for GoogleApps
authentication: :plain
user_name: “username@youdomain.com”
password: “password”

3. Start up Redmine and test your Email
Next it’s time to start up Redmine and to send a test email. Make sure that you start Redmine in the same mode as you configured above (e.g. production). To send a test email:
Login as an administrator
Go to the Administration panel
Go into the Settings and select the “Email notifications” tab
In the bottom right, click the link to “Send a test email”

  • 0 Comments
  • Filed under: Ruby&Rails
  • 上次装完后发现rails命令没法使用,一直不晓得原因,就卸载了,今天又装了一次,然后运行下rails,看到

    eoe:~ IceskYsl$ rails -v
    /Library/Ruby/Site/1.8/rubygems.rb:334:in `bin_path’: can’t find executable rails for rails-3.0.0.beta (Gem::Exception)
    from /usr/bin/rails:19

    看来还是有问题,看看都装了啥gems,如下
    eoe:~ IceskYsl$ gem list

    *** LOCAL GEMS ***

    abstract (1.0.0)
    actionmailer (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2, 1.3.6)
    actionpack (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2, 1.13.6)
    actionwebservice (1.2.6)
    activemodel (3.0.0.beta)
    activerecord (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2, 1.15.6)
    activeresource (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2)
    activesupport (3.0.0.beta, 2.3.5, 2.3.4, 2.2.2, 1.4.4)
    奇怪,没看到railties,看来这个没装上,我再装一次。
    eoe:~ IceskYsl$ sudo gem install railties –pre
    Successfully installed railties-3.0.0.beta
    1 gem installed
    Installing ri documentation for railties-3.0.0.beta…
    Installing RDoc documentation for railties-3.0.0.beta…
    eoe:~ IceskYsl$ rails -v
    Rails 3.0.0.beta

    ok,可以了!

    参考资料:

    http://oscardelben.com/articles/2009/12/06/how-to-test-rails-3.html

    http://adamfortuna.com/2010/02/06/getting-rails-3-beta-setup/

    http://d.hatena.ne.jp/h-nakao/20100210/1265775935

  • 1 Comment
  • Filed under: Uncategorized
  • 有很多插件可以做这个事情,例如use_db ,magic_multi_connections等等,但是也有更简单得方法,如下,2步就好了

    1. 设置database的config
    extradb_production:
    adapter: mysql
    host: localhost
    username: root
    password: blabla
    database: extradb_prod
    2. 在相关得 Model 利用 estabilish_connection 去做连接即可
    class lala < ActiveRecord::Base
    establish_connection :extradb_production
    end

  • 0 Comments
  • Filed under: Mysql, Ruby&Rails
  • W3C has offered some new options for borders in CSS3, of which one is border-radius. Both Mozila/Firefox and Safari 3 have implemented this function, which allows you to create round corners on box-items. This is an example:

    Mozilla/Firefox and Safari 3 users should see a nicely rounded box, with a nicely rounded border.
    The code for this example above is actually quite simple:

    These different corners can also each be handled on their own, Mozilla has other names for the feature than the spec says it should have though, as it has f.i. -moz-border-radius-topright as opposed to -webkit-border-top-right-radius:

    Mozilla/Firefox and Safari 3 users should see a box with a rounded left upper corner.
    Mozilla/Firefox and Safari 3 users should see a box with a rounded right upper corner.
    Mozilla/Firefox and Safari 3 users should see a box with a rounded left lower corner.
    Mozilla/Firefox and Safari 3 users should see a box with a rounded right lower corner.
    These are handled by / should be handled by:

    -moz-border-radius-topleft / -webkit-border-top-left-radius
    -moz-border-radius-topright / -webkit-border-top-right-radius
    -moz-border-radius-bottomleft / -webkit-border-bottom-left-radius
    -moz-border-radius-bottomright / -webkit-border-bottom-right-radius

  • 0 Comments
  • Filed under: 设计
  • Download Ruby Enterprise Edition(REE)

    前段时间用上了Passenger ,尔后就看到很多的人推荐使用Ruby Enterprise Edition(REE),今天得闲,试了一把。
    Step 1: Download
    Source code: version 1.8.7-2010.01
    Step 2: Install
    Extract it:
    tar xzvf ruby-enterprise-X.X.X.tar.gz
    Run the installer (completely safe, none of your system files will be touched!):
    ./ruby-enterprise-X.X.X/installer

    Welcome to the Ruby Enterprise Edition installer
    This installer will help you install Ruby Enterprise Edition 1.8.7-2010.01.
    Don’t worry, none of your system files will be touched if you don’t want them
    to, so there is no risk that things will screw up.
    You can expect this from the installation process:
    1. Ruby Enterprise Edition will be compiled and optimized for speed for this
    system.
    2. Ruby on Rails will be installed for Ruby Enterprise Edition.
    3. You will learn how to tell Phusion Passenger to use Ruby Enterprise
    Edition instead of regular Ruby.
    Press Enter to continue, or Ctrl-C to abort.

    Welcome to the Ruby Enterprise Edition installerThis installer will help you install Ruby Enterprise Edition 1.8.7-2010.01.Don’t worry, none of your system files will be touched if you don’t want themto, so there is no risk that things will screw up.
    You can expect this from the installation process:
    1. Ruby Enterprise Edition will be compiled and optimized for speed for this     system.

    2. Ruby on Rails will be installed for Ruby Enterprise Edition.

    3. You will learn how to tell Phusion Passenger to use Ruby Enterprise     Edition instead of regular Ruby.
    Press Enter to continue, or Ctrl-C to abort.

    Step 3: Make Phusion Passenger use Ruby Enterprise Edition instead of regular Ruby
    Follow the instructions that the Ruby Enterprise Edition installer gave you.

  • 0 Comments
  • Filed under: Ruby&Rails
  • Rails启动后报错,ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/temp/mysql.sock’ (2)

    1、先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.
    另外看看是不是权限问题.

    2、确定你的mysql.sock是不是在那个位置,
    mysql -u 你的mysql用户名 -p -S /var/lib/mysql/mysql.sock

    3、试试:service mysqld start

    4、如果是权限问题,则先改变权限 #chown -R mysql:mysql /var/lib/mysql

    [root@localhost ~]# /etc/init.d/mysqld start
    启动 MySQL: [ 确定 ]
    [root@localhost ~]# mysql -uroot -p

  • 0 Comments
  • Filed under: Mysql
  • Page::页面

    Calendar::日历

    September 2010
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  

    RSSTwitter: iceskysl