Author: 芳草苑主

  • Command Line Serves Me The Best

    刚在Godaddy开始使用Dedicated Server时,觉得Godaddy自己开发的Simple Control Panel还不错,所有设置都是在Simple Control Panel里完成。不知从什么时候起觉得Simple Control Panel实在不方便,主要是无法完成批量作业。于是,我慢慢摸索常用任务的命令行方式,或者直接修改配置文件。

    今天凌晨我纯属好奇,想在Simple Control Panel尝试启动Linux防火墙。很早以前我试过启动防火墙,结果是Actinic无法上传文件,其他网站正常。笨笨的Actinic,但没办法,它是一个主要网站,服务器只有为它Compromise。后来有多次升级,所以我突然想看看Actinic能否与防火墙并存。

    可能与平时我直接修改配置文件有关,经我修改的配置文件已经不是Simple Control Panel能看懂的了。我在Simple Control Panel里一点启动防火墙,结果所有的网站都访问不了了,要命的是连Simple Control Panel也访问不了了,我怎么才能关闭防火墙?

    因为不知道学习命令行方式关闭防火墙有多难,情急之下先submit a ticket,请support把眼前的问题解决再说。然后当然不能等support回复啦,我开始Google,发现用ssh command line关闭防火墙很简单,真的,两句话搞掂。早知这么简单,我就不会花5分钟时间submit the ticket。

    我又花了至少两分钟submit another ticket cancelling the request in the previous ticket。

    我喜欢命令行,我喜欢SSH,另外我也喜欢Google。

  • VBA字符串精确比较

    我实在没想到在VBA里,(“abc” = “ABC”) = true。

    为了debug这个被我认为 false的判断,我找了好久。找到了已经想通了,从DOS到Windows,微软不是一直在营造一种大小写不敏感的气氛吗?只是我没估计到从程序员这么严谨的角度,竟然也是忽略字符串大小写。可能我越来越Linux了,对Windows这一套哲学越来越不适应了。

    不过,VBA里要精确比较字符串也是做得到的: StrComp(String1, String2, vbBinaryCompare).

  • qTranslate Update

    我很喜欢qTranslate这个插件,尽管我没在这个blog上使用。

    qTranslate更新很快,最近几次我注意到每次WordPress一有更新,qTranslate随后就有更新。

    但我就不明白了——每次WordPress更新后,老版本的qTranslate就工作不正常了。编辑时,qTranslate is disabled(当然这也不是什么大不了的缺陷,反正我更习惯于直接写代码)。非得qTranslate出一个更新,这个毛病才能解决。

    是不是秦谦老兄写的qTransalte不太符合WordPress Plugin规范?

  • Create Effective Backlinks

    要有好排名得有好的backlinks,这个道理我很早就知道了,但一直未及深入研究。最近读到一篇文章很有可操作性,我准备依样画瓢。

    1. Use wordpress.com for creating your blogs. – WordPress has grate on-site SEO and blogs on WordPress.com get indexed pretty quickly. Once you create an account there, you can create unlimited number of blogs without having to register any new accounts.

      不指是直接使用wordpress.com的blog好,还是自己安装一个wordpress blog好?

    2. Write more then one post per blog. – Google loves backlinks that look natural and active blog that has your link in blogrol seems pretty natural. You can also include some backlinks inside blog posts linking to relevant parts of the website you are building backlinks for.

      到底写几篇post才算好呢?要知道写post很累的啊!

    3. Use Scribefire – Scribefire is grate firefox plugin that will allow you to write into your wordpress blogs from your browser. It helps a lot to have all your blogs listed in it and be able to drag-and-drop pictures from the web directly into your blog posts.

      Scribefire倒不必了,我觉得在线编辑已经很方便了。

    4. Your blog posts don’t have to be masterpieces – Remember you are not writing content for readers, you are writing it for spiders so it only has to seem relevant to the topic.

      这我知道,但我总会尽力写好post的。随便写点东西,或者排版很糟糕,搜索引擎可以糊弄过去,观众糊弄不过去啊。

    5. Promote your blogs – You won’t have much use of these backlinks if you don’t build backlinks for the blog. Luckily, building these backlinks is not so hard as you can use all the benefits provided by RSS feed. Submit your blogs RSS feed to as many services as you can that will create some backlinks out of it. It is also easier to do this when you have more blogs to submit at once.

      我觉得submit rss feed是最值得操作的。

  • PhpList Can Work With SSL POP

    想要phpList process bounce messages,邮箱却只支持SSL POP (port 995, 如gmail)?没问题。

    config.php 作以下设置:

    $bounce_protocol = 'pop';
    $message_envelope = 'username@gmail.com';
    $bounce_mailbox_host = 'pop.gmail.com';
    $bounce_mailbox_user = 'username@gmail.com';
    $bounce_mailbox_password = 'password';
    $bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

    我本还担心phpList 不能从gmail上pop出bounce messages,正想着去专门建一个未经SSL处理的POP邮箱,没想到phpList轻易就达到了我的要求。

    另外我还发现,按照phpList自己的说法,php必须运行在safe_mode off的环境下才能让phpList 处理bounce messages,但我亲身实验结果显示safe_mode can be on.

  • Magento Cache

    关于Magento的Cache机制还有待进一步了解。目前我知道的是:

    在local.xml更改Magento backend admin url以后,要Refresh Cache才会生效。

    刚才我试了很久才想到要清除缓存,否则我还以为我没找对地方。

  • 老板不了解下属的工作量是种悲哀

    金融危机袭来,公司的业务摇摇欲坠。老板收缩战线,解雇了几个人,暂时认为我比较重要,留下了。我倒没多想,先干着呗。

    但是事情总要有人做啊,老板亲自上阵,做我同事原来做的事情。今天盘点库存,盘点完毕入账的时候,他花了6个小时还没完成老同事2个小时就能完成的收入工作。最后老板感慨,这输入原来要花那么多时间啊。我说,除非你投资一套条码设备,否则这时间能省下来吗?

    老板无语,然后他又开始怀疑老同事是否真能这么快完成输入。我无语,其实我也干过这活,也就2个小时的工作量吧,但这是建立在我熟记产品代码和产品名称的实践经验基础上的。

    我并不是建议老板们都来做做下属的工作(专业分工嘛),但老板如果以为下属的工作都那么好做的话,那是种悲哀——下属的悲哀,更是老板的悲哀。

  • Use Analytics to Track Newsletter Open Rate

    I realise it is NOT possible to use Analytics to track newsletter open rate. Because:

    • To track if an email is opened, you put an invisible image into the email with img src calling a tracking program.
    • If you put a web page url as img src, the javascript of the web page won’t run.

    So, in order to track newsletter open rate, you must point img src to a server-side tracking program. Analytics won’t fit for this job because it is client-side script.

    Actually, tracking newsletter open rate is very easy with phpList, which I have been using for long. Simply to [USERTRACK] into the body of the email.

  • Magento Bug

    我在Magento 1.1.8里发现一个可能的Bug: Category Design的值只有All store views的值起作用,针对各个store view分别做的不同的值均被忽略。

    不过这暂时对我没什么影响,因为我的一个Root Category只对应一个store view。

  • 思维定势

    Tesco经常给我寄各种各样的Coupon,我很喜欢。

    Cow & Gate婴儿奶粉罐里有时也会开出一张Coupon,通常是买下一罐奶粉Save £1。我中到一张,Valid to 30/11/08,今天最后一天。

    今天礼拜天,Hove Tesco 下午4点就关门,而我有事,4点之前不想专门为用掉一张Coupon跑一趟Hove Tesco。眼看着让这张Coupon作废,我突然想到:Cow & Gate给的Coupon,指明各大零售店均可使用,Cow & Gate负责兑现,我偏偏只想着去Tesco买。Tesco Coupon用惯了,以致见了Coupon就想着去Tesco买。

    这种思维定势真的很可怕。幸好我及时跳出定势,就近在Waitrose花掉了这张即将作废的Coupon。