Twitter Updates for 2010-02-08

Powered by Twitter Tools

Twitter Updates for 2010-02-07

  • 在New York I Love You里面听到了崔健的歌… #

Powered by Twitter Tools

Twitter Updates for 2010-02-06

  • #
  • 出去扔垃圾,看到黑夜中飘着密密的雪花。 #
  • RT @bearice: 你有病啊!你有药啊!你吃多少!你有多少我吃多少!你吃多少我有多少!你有病啊! #

Powered by Twitter Tools

Twitter Updates for 2010-02-05

  • @vpser dreamhost的web hosting可以的。 #
  • @vpser 很多Web Hosting都可以的,或者有个收费的:http://repositoryhosting.com in reply to vpser #
  • @vpser 后台->Goodies->Subversion in reply to vpser #
  • 我还是很喜欢VirtualBox启动虚拟机的界面,那些蓝色看起来很舒服。不知道今后Oracle将会让VirtualBox何去何从… #

Powered by Twitter Tools

Python 使用 GData-Client-Python 库访问Youtube数据

使用Python和gdata-python-client就可以访问Google的诸多服务,下面的例子是访问Youtube.com视频的方法。在Youtube.com的API站点找到的:

import gdata.youtube
import gdata.youtube.service
 
yt_service = gdata.youtube.service.YouTubeService()
entry = yt_service.GetYouTubeVideoEntry(video_id='TGbwL8kSpEk')
 
def PrintEntryDetails(entry):
    print 'Video title: %s' % entry.media.title.text
    print 'Video published on: %s ' % entry.published.text
    print 'Video description: %s' % entry.media.description.text
    print 'Video category: %s' % entry.media.category[0].text
    print 'Video tags: %s' % entry.media.keywords.text
    print 'Video watch page: %s' % entry.media.player.url
    print 'Video flash player URL: %s' % entry.GetSwfUrl()
    print 'Video duration: %s' % entry.media.duration.seconds
 
    # show alternate formats
    for alternate_format in entry.media.content:
        if 'isDefault' not in alternate_format.extension_attributes:
            print 'Alternate format: %s | url: %s ' % (alternate_format.type, alternate_format.url)
 
    # show thumbnails
    for thumbnail in entry.media.thumbnail:
        urls = thumbnail.url.split('/')
        ids = urls[len(urls) - 1].split('.')
        print ids[0]
        print 'Thumbnail url: %s' % thumbnail.url
 
PrintEntryDetails(entry)

Twitter Updates for 2010-02-04

  • RT @heqian: 通往票贩子控制铁路运输的道路,是由每一个认为“合理”的人铺就的⋯⋯ RT @sswv: @Ray_h 西北方面,一般T69加200元,K43加100元,T151、T75加50元算是合理。//去Sogo买个电脑包,售货员提醒 #
  • RT @vpser: 谁知道比较好用的SVN Hosting啊,推荐几个 //Google Code? 你要找Private的么? #

Powered by Twitter Tools

CentOS VPS 安装 OpenVPN

最近频繁在CentOS的VPS上安装OpenVPN,安装过程中还是颇有周折。首先是要和客服人员沟通开通TUN/TAP、iptables和NAT。有的VPS只开通iptables却没有NAT的支持,iptables设置postrouting的时候还是会失败。不管你在开通的时候怎么要求,VPS开通的时候还是要提交个ticket来处理这些事情。

默认CentOS的源里面只有很少的软件,需要安装EPEL(Extra Packages for Enterprise Linux),这样源里面的就有openvpn了。

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

然后再执行安装openvpn的命令。

yum install openvpn

剩下的配置文件和别的一样,启动iptables的命令是:

#1.2.3.4改成VPS分配的Main IP
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 1.2.3.4

这次要再评论photonvps.com一下,购买的VPS分配的IP被Google误认为是德国的IP,看Youtube的时候总是有些影片受限制,看hulu.com的时候就没有什么问题。跟他们沟通更换IP,最后到另外一台机器上新安装了一个VPS。觉得photonvps.com的服务还是不错,是值得推荐的一家VPS厂商。

—————————————————————————————–
杯具了,新换的IP被Google认为是法国的IP….

Twitter Updates for 2010-02-03

  • nytimes的skimmer界面看起来很清爽。 #
  • RT @foxlog: 必须的//RT @telking: 无论是yum还是apt-get安装的程序都感觉不太理想,要修改下什么就难很多,感觉还是自己make最好 //gentoo 的 emerge 定制更容易一些。 #
  • #
  • 错过了今晚的京剧晚会,哎~ #
  • RT @mongodb: would be great if you could fill out this short survey about mongodb: http://www.surveymonkey.com/s/mongodb //关注mongodb #
  • Adobe AIR 2 Beta 2发布了,下载地址:http://labs.adobe.com/downloads/air2.html #
  • RT @xmpp: RT: @sprewellkobe: SAE alpha2正式发布 http://sae.sina.com.cn //我就想知道用SAE是不是也有跟服务器拔线一样的事,sina的自我阉割一向都比较彻底,能保证数据的隐私么? #

Powered by Twitter Tools

Twitter Updates for 2010-02-02

  • 4M的网络就是快,开hulu一点都不卡。帝都的网络为什么这么贵… #
  • nytimes.com的首页,到处都是China的字样… #
  • 注册VirtualBox的用户时,不开VPN怎么都注册不上。NND… #
  • #echofon 怎么就不弄个设置字体的功能呢? #

Powered by Twitter Tools

Twitter Updates for 2010-02-01

Powered by Twitter Tools