Date: July 8th, 2010
Cate: Blog
5 msgs

离开

又一个学期结束了,终于成为了这个学校最老的一批学生。和往年不同,这次看着大四的学生纷纷离去,没有任何感觉,一切都像它应该发生的那样发生了。食堂外卖旧书旧物的地摊,宿舍楼满地狼藉的楼道和成山的垃圾堆,还有拖着行李箱最后一次跨出校门的学生,行李箱上搭放着一本叫做《毕业五年》的书,这是我唯一额外注意到的细节。没有去看他们的脸,不知道上面是写着是自信,是憧憬,还是平静,或是迷茫。

明天我也要回家了,心情就像也和他们毕业了一样。我想象这就是明年我离开时的样子,背一个书包,拖一个箱子,踏出这个校门,再也不回来。曾经的时光,也再也回不来。

Date: July 3rd, 2010
Cate: Blog
22 msgs

信任?

三年内丢掉的第三个手机。晚上在实验室做实验,都是一个班的同学,手机放桌子上,离开了一会,回来时就不在了,关机。毫无疑问,被偷了。第一个手机是在大街上被偷的,第二个是在食堂,第三个我万万没想到会是被自己的同学偷的。真的是人心隔肚皮,白天还在一起说说笑笑,现在估计就躲在被窝里,拔掉SIM卡玩弄起了我的手机。现在的学生都怎么了?偶尔能听到一些拾金不昧的传说,自己却从没遇到过。不小心丢掉的东西从来没找回过,哪怕只是一个对捡到个人毫无价值的记事本,首页就是我的联系方式。

一次在ATM机上取款,前面的人忘了退卡,我把卡退了,想办法找到人家还给了他。这让我感到很快乐,觉得这是一个值得信赖的世界。在图书馆,在教室,上厕所时我都是把手机放桌子上,因为我觉得学校是一个相对纯净的地方,不用处处提防。可是我错了,今晚才发现,这就是代价!

我真的很想信任哪怕一个擦肩而过的路人,可现实却是连同窗几年的同学都不能相信,谁的悲哀呢?

Date: June 25th, 2010
Cate: Blog
4 msgs

New Slang

这首歌听了不下百次,还是那么耐听。歌曲的MV也有很多个版本,但都是网友自己制作的,有着统一的风格,都是一些很平常的画面,组合在一起就让人感到格外亲切甚至感动。我最喜欢下面的这个版本,一个逃学的小男生流浪一天的生活。

Date: June 23rd, 2010
Cate: Blog, Technic
4 msgs

Transcode Podcast to Streaming Radio

One of my favorite radio station switched from shortwave to internet , and is now switching from live broadcasting to podcast. They call it a reforming to catch up with the age, but I still prefer listening the traditional way, tuning in to my favorite programs on a radio receiver, or listen online through live streams. I hate podcasts!

So I  set out to transcode their podcasts into a streaming radio on my server, and listen when I’m at my computer, just like tuning to a live program. To achieve this, three parts are needed:

  • Download podcasts from the RSS source
  • Encode the audio files into live streams
  • Publish it on a Icecast or Shoutcast sever

My server is runing CentOS 5.4. For downloading podcasts, I find a nice program called Podcatcher on sourceforge, it can do this job perfectly. Download it at http://podcatcher.rubyforge.org/ and please read the READEME file for usage. I created a cron job with Podcatcher using the following macro.

/me/podcast/bin/podcatcher --cachedir /me/audio/podcast/ -d /me/podcast/bin/ --size 2048 -S chron http://www.1cvc.com/audio/feed

Podcasts will be updated every 30 minutes, all files will be stored locally in folder /me/audio/podcast/. The cache dir is set to up to 2GB, old files will be deleted when folder overflowed.

Then encode the mp3 files into live streams. There are many free software available for Linux, I choose ices0.4 from icecast.org, most compliant with Icecast streaming server which I will use in the next step, you may still use other softwares such as ezstream and oddcast. Follow the example to create a config file, documents are available at http://www.icecast.org/docs/ices-2.0.0/config.html. Note: to stream in a fixed bitrate, you must enable the “reencode” option.

Playlist can be generated using following line:

find /me/audio/podcast/ -type f -name "*.mp3" -mtime -1 > /me/ices/playlist.txt

This script will find all mp3 files created within 24 hours in the folder and export their paths to playlist.txt, one file per line. Add this script as a cron job, then the playlist will get updated automatically, but unfortunately, ices won’t notice the changes, and there’s no parameter to reload configuration, so you have to kill the process and reopen it. Together with the script above, I put the following scripts to a cron job, running once a day at midnight:

find me/audio/podcast -type f -name "*.mp3" -mtime -1 > /me/ices/playlist.txt
killall ices
ices -c /me/ices/ices.conf

Now, time to wake up our Icecast server. I assume you have installed it without any problem, there are many detailed documents on how to config the Icecast server if you face any: http://www.icecast.org/docs.php. Just to mention, with Icecast, configuration can be reloaded by sending a HUP signal to it, like:

killall -s HUP icecast

Enjoy it! playhttp://stream.judesimon.com/sea.m3u

Date: June 23rd, 2010
Cate: Blog
9 msgs

提供一些免费服务

换了VPS,在美国西岸,现在对中国的速度应该不错,还支持IPv6。提供一些免费服务:

  • GAE上网站的反向代理,只接受个人博客
  • Icecast流媒体托管,你可以发布你的个人电台
  • IPv6电台。做了一些电台的中继,方便自己和教育网IPv6用户收听国外电台。地址:http://judesimon.com/radio
  • SSH/OpenVPN/普通代理

不保证一直有效,也不保证服务的稳定。