Thursday, 30 October 2008

Repositories for Ubuntu 9.04

# deb cdrom:[Ubuntu 9.04 _Jaunty Jackalope_ - Release i386 (20090420.1)]/ jaunty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty universe
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu jaunty partner
# deb-src http://archive.canonical.com/ubuntu jaunty partner

deb http://security.ubuntu.com/ubuntu jaunty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted
deb http://security.ubuntu.com/ubuntu jaunty-security universe
# deb-src http://security.ubuntu.com/ubuntu jaunty-security universe
deb http://security.ubuntu.com/ubuntu jaunty-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jaunty-security multiverse
# ============================================================================
# latest (beta versions) versions:
# deb http://ppa.launchpad.net/fta/ubuntu intrepid main

# http://medibuntu.org/
# sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
# the public key:
# sudo apt-get update && sudo apt-get install medibuntu-keyring

# ==========================================
# Google
deb http://dl.google.com/linux/deb/ stable non-free
# wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
# Or goto http://www.google.com/linuxrepositories/apt.html to download the key, then install by using synaptic

# Wine
#sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list -O /etc/apt/sources.list.d/winehq.list
# wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

# Miro
deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu jaunty/

# =========================
# PPA
# Firefox
deb http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu jaunty main
# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247510BE

# Banshee
deb http://ppa.launchpad.net/banshee-team/ppa/ubuntu jaunty main
# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E80C6B7

# Openoffice
deb http://ppa.launchpad.net/openoffice-pkgs/ppa/ubuntu jaunty main
# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 247D1CFF

# Ubuntu-netbook-remix
deb http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main
# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6598A30

# Ubuntu-tweak
deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/tualatrix/ppa/ubuntu jaunty main
# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E260F5B0

# for Mac users
deb http://ppa.launchpad.net/mactel-support/ppa/ubuntu jaunty main# key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2B97B7B8

# chromium
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
#key: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E5E17B5

Wednesday, 29 October 2008

[funny]Pres. Bush endorses McCain and Palin



说话的声音,形态和招牌动作都模仿的很象,搞笑。
并且谁得到布什的支持,估计谁就没戏了。哈

Friday, 24 October 2008

中文podcast(beta): 介绍podcast

首次试录,简要介绍podcast。
用手机录的,试试效果。哈

original audio


HOWTO: convert amr ringtones or voice recording to mp3/ogg/wav

First you should decode the file to the raw format:
$ amrnb-decoder Sound1.amr Sound2.raw
which should produce something like this:
================================================== =================
TS 26.104
REL-5 V5.4.0 2004-03
REL-6 V6.1.0 2004-03
3GPP AMR Floating-point Speech Decoder
================================================== =================

Secondly, you can convert the resulting .raw file to other preferred format in Audacity.
In Audacity, using 'File->Import->Raw Data' to open the raw file by selecting 8000 as the sample rate.

Thursday, 23 October 2008

The music players for Ipod in Linux

A little bit jealous of Mac users, because those stupid people have a smart itune.
Compared with clever us, linux users, we have to confront the bloody true world.

Here are my favorite music players. So far, none of them can be called perfect.

1. Rhythmbox 0.11.6
As a 'music' player supporting podcasting, for audio ones, it works very very well, just like itune, the episodes can be marked new or old. super!
And support Chinese characters.
But it can not do the right things of video podcast transferring to ipod, even though it can play video now using visualization.

2. Banshee 1.4
Almost can do everything, including video podcast transfering to ipod, and a sync button.
But 1) not support transferring music or videos with Chinese file name correctly. Yes, you can transfer them, but when you reconnect ipod, most of the songs in ipod can not be recognized. Maybe the database in ipod is destroyed by the Chinese characters; Except everytime you re-sync your music library in ipod.
And 2) Doesn't mark the item is new or listened. (compared with Rhythmbox and amarok)

3. Songbird 1.0
Great products and ideas from mozilla. In the current 0.70 version, the synchronaztion works. (add something to tell ipod the item is video, so ipod nano 3rd gen will not see and hear any video podcasts)
And support Chinese characters.
But it has same shortcoming with firefox 1) too much memory usage, because of internal web engine embeded. 2) Without new/old marks in Ipod. Also, 3) It can not watch folders, but this feature is coming in half of year, feb 2009. 4) Very weak functionality for podcasting.

4. Amarok
Mark new or old, video podcasting and transfering, supporint Chinese characters. Only missing the sync button, but it can add the new podcast episodes to a queue, which collects all the items are waiting for transferring to ipod.
But 1) No sync button, have to manually sync each playlist, transfer episode and delete old episodes. 2) Very odd KDE interface and menu, difficult to find the right place to show what's in ipod libary and how to transfer or sync.

Penguins can fly in Linux

中文podcast(beta): zero

先放上一段英语学习的mp3来调试。很快就会有这个podcast的介绍。


original audio



Bloody correct comments on Mac and Linux(current)

Paul Murphy, noted recently,

MacOS X is the no brainer option…[it] mostly just stays out of the way of knowledgeable users. In fact, for many it meets the IT ideal: it works so well, they don’t know it’s there or doing anything to help them - they just click and expect it to work; because, well, it just does.

When Linux can do that too (and Ubuntu brings us pretty close), it makes it ever harder to justify licensing Windows. Now if the educational software vendors can just become platform agnostic, I’ll be a happy camper.

HOWTO: 使用Mutagen来修改Mp3文件的标签信息

具体方法如下(只针对GBK/GB18030编码的情况):

安装Mutagen(ubuntu下终端运行 sudo apt-get install python-mutagen)后,在终端执行:


mid3iconv -e gbk *.mp3

如果想转换当前目录下的所有 mp3 (包括子目录):

find . -iname "*.mp3" -execdir mid3iconv -e gbk {} ;

这里只介绍最常见的情况,更多信息可以查看Nicky的文章,他分析得很详细。

Wednesday, 22 October 2008

Ubuntu AD Rocks, Come on baby

http://blog.omega-research.org/uploads/2007/09/ubuntu-linux-very-friendly-circle-of-friends.jpg

HOWTO: NFS server

Install NFS Server Support
at the terminal type
sudo apt-get install nfs-kernel-server nfs-common portmap
(Optional: sudo dpkg-reconfigure portmap)
sudo /etc/init.d/portmap restart

Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server

invoke your favorite text editor or
sudo vi /etc/exports

Here are some quick examples of what you could add to your /etc/exports

For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255

  • /files 192.168.1.1/24(rw,no_root_squash,async)
    Here /24 is netmask, meaning the netmask is 24 bits. Therefore, above line can be equivalent to:
  • /files 192.168.1.1/255.255.255.0 (rw,no_root_squash,async)
    details can be found in the reference

Or for Read Only from a single machine
  • /files 192.168.1.2 (ro,async)
save this file and then in a terminal type
sudo /etc/init.d/nfs-kernel-server restart

Also aftter making changes to /etc/exports in a terminal you must type
sudo exportfs -a

Install NFS client support
sudo apt-get install portmap nfs-common

Mounting manually
Example to mount server.mydomain.com:/files to /files. In this example server.mydomain.com is the name of the server containing the nfs share, and files is the name of the share on the nfs server

The mount point /files must first exist on the client machine.
cd /
sudo mkdir files


to mount the share from a terminal type

sudo mount server.mydomain.com:/files /files

Note you may need to restart above services:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart


Mounting at boot using /etc/fstab
Invoke the text editor using your favorite editor, or
gksudo gedit /etc/fstab

In this example my /etc/fstab was like this:
  • server.mydomain.com:/files /files nfs rsize=8192,wsize=8192,timeo=14,intr
You could copy and paste my line, and change “servername.mydomain.com:/files”, and “/files” to match your server name:share name, and the name of the mount point you created.
It is a good idea to test this before a reboot in case a mistake was made.
type
mount /files
in a terminal, and the mount point /files will be mounted from the server.

Reference:
==========
http://www.cyberciti.biz/tips/ubuntu...nfs-share.html (for client configuration)
http://www.redhat.com/docs/manuals/l...nfs-mount.html (for mounting using fstab)
http://czarism.com/easy-peasy-ubuntu...s-file-sharing (for server configuration)
http://www.freebsd.org/doc/en_US.ISO...twork-nfs.html (contains more info about NFS)
http://www.freebsd.org/cgi/man.cgi?query=exports&sektion=5 (man for exports)
http://www.computerhope.com/jargon/n/netmask.htm (netmask /24 things)

a nice try of ubuntu linux for education in China







Tuesday, 21 October 2008

We're winning!

Image


Blogged from: http://mwcnews.net/content/view/9256/166/

Disappointed Ubuntu upgrade to 8.10 compared with Fedora 10

New features in Ubuntu 8.10:

  • Linux kernel 2.6.27
  • GNOME 2.24
  • Encrypted private directory
  • X.Org 7.4 (offering better support for keyboards, mice, and tablets)
  • Network Manager 0.7 (improved network management)
  • Dell’s DKMS (Dynamic Kernel Module Support)
  • PAM authentication
  • BBC plugin for Totem (grab free shows from the BBC)
  • Guest session support.

New features in Fedora 10:
  • AMQP Infrastructure: A technology that makes it easy to build scalable, interoperable, high-performance enterprise application
  • Appliance Tools: Tools and meta-data that make it easier for anyone (ISVs, developers, OEMS, etc) to create and deploy virtual appliances
  • Artistic 1.0 License Removal: Remove all packages licensed under only the Artistic 1.0 license before Fedora 10
  • Better Printing
  • Better Remote Support
  • Better Start-up
  • Better Webcam Support
  • Connection Sharing: Enable adhoc network sharing
  • Echo Icon Theme
  • Eclipse 3.4: Rebase Eclipse to version 3.4
  • EFI
  • Evdev Input Driver
  • Faster Startup
  • First Aid Kit: First Aid Kit is an automated recovery tool that brings together common recovery processes and applies them to a system
  • Glitch Free Audio: Rewrite the PulseAudio sound server to use timer-based audio scheduling
  • Gnome 2.24: Re-base Fedora to Gnome 2.24
  • GStreamer RPM dependencies: dependencies Assist automated installation of GStreamer codecs provided by third-party repositories
  • Kernel Modes Setting for Graphics: Move graphic mode initialization from the X server's DDX drivers to the kernel
  • NetBeans IDE: Add the NetBeans IDE to Fedora
  • Online Accounts Service: Provides applications with credentials for user's online accounts listed on online.gnome.org or stored in GConf
  • Python NSS Bindings
  • Remote Virtual Install
  • RPM 4.6
  • Save to Bugzilla: Auto create bugzilla entry with anaconda tracebacks
  • Sbin Sanity: Add /usr/local/sbin:/usr/sbin:/sbin to the PATH
  • for normal users to simplify command-line administration tasks
  • Security Audit: A new security audit system and intrusion detection system
  • Sugar Desktop: Include the Sugar Desktop (used in OLPC) in Fedora
  • Virtual Storage: Make storage provisioning over libvirt connections (local and remote) virtual machines as simple as possible.

Compared with these two major distro of linux, ubuntu is more like a service pack to me than a new release (from:http://blogs.zdnet.com/hardware/?p=2788) . While Fedora pushes it's milestone release, which will be the shipped to next version of Red Hat Enterprise Linux 6, to a new level, even though some features have existed in ubuntu or other distros, fedora got a huge improvement.

Monday, 20 October 2008

HOWTO: 昂达989+ 白屏

经过一系列的刷机,烧录和几个论坛的折腾,终于找到一条融会贯通,于其他人不太一样的解决办法。

经验说明,一旦白屏,烧录很难解决。
综合其他人的经验加本人989+白屏解决办法,总结如下:

白屏的原因并非软件,而是‘接触不良’的问题。
1.在一个高级一点的单片机论坛里看到,是因为‘虚焊’,
2.在一昂达论坛看到说有人在一个黑色芯片下垫纸解决。
3.本人则是发现用力按下方向键,反而有开机成功的机会。

综上,应该是接触不良的问题。

当把最新的固件保存到根目录下,然后用力按下屏幕中央,再按住‘向下’方向键,再开机,于是发现,可以升级固件了。于是最新固件(此时是1.25)升级成功,白屏基本没有再出现。

HOWTO: Remove Input Method(SCIM) from Right Click Menu

Type "ALT+F2" and start the "gconf-editor". Then:

desktop --> gnome --> interface

and disable

show_input_method_menu
show_unicode_menu

Sunday, 19 October 2008

HOWTO: TAB TO AUTOCOMPLETE COMMAND OPTIONS

yum install bash-completion
Now you will get the ability to use TAB to autocomplete your command and COMMAND OPTIONS.

Friday, 17 October 2008

Queen on Google




女王第二次与google‘合作’,上次是在youtuble上开设皇家频道。这次是以女王的头像的google的logo。
http://www.timesonline.co.uk/multimedia/archive/00415/google1_415407a.jpg
这个Royal Channel on YouTube 公布了 54个皇室的视频,已经被浏览160万次,如果女王自己也做一个blog的话,这个浏览量应该能给皇室带了更多的广告效益。2006年女王的演讲还被受准作为podcast发行。可见女王作为一个internet的使用者,已经走在了我们绝大多数人的前面,google以之作为logo,不足为怪。

但是在这个视频中,个人发现一点比较有趣的现象,主要负责接待的google高官,无一带领带,都是敞开西服上衣,里面衬衫领子,随意凌乱的自由状态。相比其他员工在女王来临之前的毕恭毕敬的联系打招呼,可以形成一个较为鲜明的对比。也许,这就是google的dressing code,或许,google在释放什么信息。哈。纯属个人理解。但是我还是比较喜欢这种风格,即便是面女女王这样的人物。

Google, well done.

Thursday, 16 October 2008

HOWTO: equivalent yum option to apt-get autoremove

To remove packages that has been installed as dependencies for the package you are removing if they are only needed for that particular package.

a yum plugin must be installed. Otherwise, yum doesn't provide the capability.

yum install yum-remove-with-leaves
Now yum will automatically have the same function as apt-get autoremove.

================
more:
yum-changelog is a Yum plugin for viewing package changelogs before/after updating.

Install yum-changelog via:
# yum install yum-changelog

How to use yum-changelog:
# yum update ktechlab --changelog
Loading "changelog" plugin
Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
[..]
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package ktechlab.i386 0:0.3-6.fc6 set to be updated
--> Running transaction check

Changes in packages about to be updated:

ktechlab - 0.3-6.fc6.i386
* Wed Nov 22 23:00:00 2006 Chitlesh Goorah - 0.3-6
- Rebuilt due to new gpsim-devel release

By default, this plugin will show the changelogs before the updates. However if you want to make it echo those changelogs after the updates, replace when=pre by when=post in the file /etc/yum/pluginconf.d/changelog.conf

HOWTO: yum equivalent function with apt-get

1. Find and review "lost" packages

You can find orphaned packages (ie packages not in the repositories anymore) with the tool package-cleanup from the yum-utils package: yum install yum-utils; package-cleanup --orphans.
Old packages with a failing "%postun" script will remain partly
installed. Remove them with rpm -e package-name-and-version. It's often
helpful to run this command after the update, too.

But here what 'package-cleanup --orphans' found out is the 'obsolete' ones in ubuntu words. Namely installed not from repositories.

2. Find yum install or update history

/var/log/yum.log

3. Find orphan packages
sudo package-cleanup --orphans

Note: Here 'package-cleanup' must run with sudo or su, otherwise lots of packages will be considered as orphans because of normal users don't know the relationship between packages and repositories.

Monday, 13 October 2008

HOWTO: wine fonts

Wine中对话框默认的字体是Tahoma,在我们的LINUX上,Tahoma字体是无法正常显示中文的。比如Wine configuration中的"确定""取消"等就变成了"<<"">>"的字样。

解决方法很简单:

在wine的regedit中,找到:

\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

方法1. 直接地将这个键设为空,问题就解决了。

方法2. 将MS Shell Dlg设置为一种自己字库中已有的中文字体即可,如果已经将windows中宋体取来使用了,字库中SimSun对应宋体(这是Windows的,LINUX下默认是没有的),在这里设置为 SimSun即可。

HOWTO: find WINE menu stored in Gnome

Everything about the wine menu is stored here in a text mode, while not separately for each item.

  • .config/menus
Especially the file, 'applications.menu', a xml file, which describes the Gnome menu structure.
Every menu-edit operation on wine menu will reflected in this file.

  • .config/menus/applications-merged
The 'wine-program-*' files, xml files, are the short-cuts appears in the 'application-wine-Programs'. The rest, not appear here, will listed in the other menu.

  • ~/.local/share/applications/wine/Programs

Where the 'application-other' menu retrieve short-cuts directly from
.

Sunday, 12 October 2008

HOWTO: codecs for fedora

http://www.mplayerhq.hu/MPlayer/releases/codecs/



download "all-20071007.tar.bz2" to your desktop, then right click and
extract it now rename the folder to codecs, then open a terminal and
type



cd ~/Desktop

su

mv codecs /opt/
ln -sf /opt/codecs /usr/lib/win32
ln -sf /opt/codecs /usr/lib/codecs
ln -sf /opt/codecs /usr/local/lib/win32
ln -sf /opt/codecs /usr/local/lib/codecs


For Totem (gstreamer)
gstreamer-ffmpeg and ffmpeg is essential.
other plugins for gstreamer will be helpful.

Friday, 10 October 2008

最需要的IT技能是什么

CIO被问道:在你的IT部门内哪些技术技能最需要?(所有的被提问者(CIO们)均工作在有100名以上员工的公司;可以选择不止一项技能;是在2008年9月做的这项调查)



•    网络管理员( Network administration (LAN, WAN)): 70%

•    Wiondows管理员(Windows administration): 69%

•    桌面支持(Desktop support): 69%

•    数据库管理( Database management): 58%

•    无线网络管理( Wireless network management): 47%

•    通讯支持(Telecommunications support): 44%

•    Web开发/网站设计(Web development/Website design): 42%

•    商业情报/报告服务(Business intelligence/reporting services): 33%

•    虚拟化(Virtualization): 32%

•    .NET开发(.NET development): 22%

•    CRM 实施(CRM implementation): 22%

•    ERP 实施(ERP implementation): 20%

•    Linux/Unix 管理员(Linux/Unix administration): 20%

•    Java开发(Java development): 17%

•    开源开发(Open source development): 17%

•    XML 开发(XML development): 17%

Bill Gates on The Daily Show With Jon Stewart



HOWTO: Gnome下节省系统资源的输入中文方式

最简单的方式输入中文就是在System-Administration-Language Support里选中'enable support to enter complex characters'.但是这样会使得scim的进程一直在后台占用一定的内存,不太‘干净’。

1。每次都是在gnome的popup menu里选择input methods-scim又太过麻烦

2。在~/.profile最后加上(出自man scim)
GTK_IM_MODULE="scim"
export GTK_IM_MODULE
这样开机会自动启动scim但是可以方便的通过右键点击图标去关闭;如果想在输入中文,只要随便打开gnome的程序,scim会自动跟着打开,关闭gnome程序,scim也会跟着自动关闭。如此可以在不需要输入中文的时候,节省些系统资源。

此种方式的输入法是全局的(global),在所有运行的程序中都可以直接输入中文。

3。在~/.bashrc最后加上(出自man scim)
GTK_IM_MODULE="scim"
export GTK_IM_MODULE
每次要输入中文,要通过terminal去启动相应gnome程序,否则通过点击快捷图标,不会启动scim。

但是如果要在fedora下,须在这两条命令前执行以下命令,否则输入法会随着login自动启动(ubuntu的.bashrc已经自带此命令)
# If not running interactively, don't do anything
[ -z "$PS1" ] && return

此种方式的输入法只是针对相应的运行的程序(session),只有在这一个程序内可以直接输入中文。(recommended)

Wednesday, 8 October 2008

hp m2000 拆解图

2005年秋季,罗钧同学托人从苏州帮我带到新加坡,3年过去了,我还没毕业,(经抢救无效)它先挂了。









Monday, 6 October 2008

HOWTO: podcast a audio in blog

here we explore some new Flash MP3 players from Google and Yahoo!
that are again light-weight, easy to implement and extremely efficient.

1. Google Reader MP3 Player


Google Reader has an inbuilt MP3 player that is pretty much the same
as Gmail player but it also works on non-Google websites. This player
has volume controls, no Google branding and it auto-detects the
duration of the music file so your readers know how long the song will
last. Here’s a live example followed by the HTML embed code:



To use this MP3 player on your website or blog, copy-paste the
following code and replace the MP3_FILE_URL with the link to your MP3
file.


<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=MP3_FILE_URL"
width="400" height="27" allowscriptaccess="never" quality="best"
bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />


2. Yahoo! MP3 Player


If you think normal is boring, check this out. Yahoo! offer a code generator (Easy Listener) to help you create a Flash based MP3 player that matches your website color theme and layout. See example:




Though this Easy Listener MP3 player requires you to pass the
address of the web page that contains the MP3 file(s), you can directly
pass the MP3 link and it will work just fine. Supports auto play and
you can decide where the meta data associated with the MP3 file should
be displayed.


<embed src="http://webjay.org/flash/dark_player" width="400" height="40" wmode="transparent" flashVars="playlist_url=MP3_FILE_URL&skin_color_1=-145,-89,-4,5&skin_color_2=-141,20,0,0" type="application/x-shockwave-flash" />


3. Yahoo! Media Player


If you maintain an MP3 blog or run a podcast and regularly link to
MP3 files, it makes little sense to embed a separate Flash player with
every MP3 file. I would therefore recommend using the Yahoo! Media Player that auto-detects links to MP3 files in your web pages and creates an embedded player for each link.


All you have to do is insert the following link in your blog
template and all MP3 hyperlinks will be converted into inline MP3
players. This also has the shuffle feature and visitors can easily skip
to any song in the playlist. Excellent stuff.


<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>


4. Odeo MP3 Player


Odeo offers a pretty impressive MP3 player (see example)
that works perfect in web pages as well as RSS readers but a small
issue is that Odeo Player requires you to type the exact duration of
the song in the embed code. You can skip this step but then the
progress bar won’t reflect the true status when you play the
song. And there are no volume controls.




To use Odeo MP3 player in your website, add the following code replacing MP3_FILE_URL and DURATION with relevant values.

<embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent"  type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=[MP3 file address]" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed>


Summary: With so many choices, how do you pick the right MP3 player for your website ?

Saturday, 4 October 2008

HOWTO: use the "label:" query word to search in Gmail

how to use the "label:" query word to search for Multi-Labeled messages
as well as Un-Labeled messages. Thanks to "rishid" on the GmailForums
for submitting this tip...



Say you want to find messages that have multiple Labels. For example,
you want to display all messages with label1, label2 and label3 that
you had previously defined and assigned. Into the basic search field at
the top of any Gmail page, you would enter label:label1 label:label2
label:label3



Note that this is searching for all messages that have label1 AND
label2 AND label3. If you want to include messages that have ANY of
those labels, you can use the "OR" command like this: label:label1 OR
label:label2 OR label:label3 (Note: "OR" must be in uppercase.)



You can optionally add a "-" to the query words to exclude search
criteria. For example, entering -label:label1 label:label2 label:label3
would return all messages that have label 2 AND label 3, but do not
have a label1 Label.



Taking this concept a step further, you can use this method to search
for all "Un-Labeled" messages. Unfortunatly, Gmail does not provide a
choice in the search dropdown that lets you search for unlabeled
messages. If you manage a large number of messages, it can be very
cumbersome to determine which messages are unlabeled. My personal
preference is to ensure that all messages have a Label making it easier
to manage and organize them.



So, if you want to list all unlabeled messages, just create a long
search string containing every label that you have defined. Be sure to
include the "-" character in front of every label. This ensures that
messages with these labels will be EXCLUDED (remember, you are looking
for all messages WITHOUT Labels.) You can also optionally include the
hidden "inbox" Label to exclude anything in your Inbox.



For example, if you have defined the Labels "Family", "Friends",
"Ebay", and "Support", you would enter the following string into the
search field (note that the labels are not case sensitive) to find all
Unlabeled messaegs:



-label:inbox -label:family -label:friends -label:ebay -label:support



If you have a large number of labels, obviously, this becomes harder
and harder to manage, so I recommend reating a "note" email to yourself
containing the search string for easy future reference.

Thursday, 2 October 2008

HOWTO: Find which Debian or ubuntu Linux Version you are running

Find or identify which version of Debian Linux you are running

This can be checked in

/etc/debian_version file


Find or identify which version of ubuntu Linux you are running

You can find in different ways in ubuntu

Solution 1

cat /etc/issue

The file /etc/issue holds the version of Ubuntu installed on your system

Solution 2

lsb_release -a

or

cat /etc/lsb-release


Where lsb for Linux Standard Base

鹤吃兔(regent park版)

周日,阳光明媚,万里无云,秋高气爽,自己的用词使我回想起国内这个时候该开中小学运动会了。

我和珊珊一起去了regent park,并拍了以下一些照片。





1.看到湖边居然有鹤。看惯了鸭子和鸽子,看到鹤觉得挺稀罕的,立刻合影留念。


http://blufiles.storage.live.com/y1phZeaaJYArJlgpGXhk7GJFJjO_OjyLX5xmsqlit2IhzeW60soXCarEDqvri6-7HXJ





2.虽说镜头28-105不济,但是也够安全的拍个特写了。


http://blufiles.storage.live.com/y1pxoO6NVqzsDZZBxgzhZmBHLsyIhKm08M3TPt7CcQs4ktA39tRDm86nZs-ge8vgBV9





3.不知道古人怎么会想到‘鹤立鸡群’,明明该是鸭群吗。


http://blufiles.storage.live.com/y1pCfB0qh_7aU4-CG_X59vKhYX2xMBFlMq95KxzM-gJYXVtygovBw0rQjQJSyt3G83e





4.飞了,仍旧是帅的一塌糊涂。


http://blufiles.storage.live.com/y1pPZ39H80z00pe-vH8ZGhXVgBYpOcjOGXpPs2jP9d6AImewnO08euoYnQLB2cOhSXq





5.后来被我发现,它跑到这来卖单来了,不知道它洒么啥呢。


http://blufiles.storage.live.com/y1p4cYJI_XvKMFdz4KNuYhmV7RMz9jhOMeiXZjSbafEai5wD0lqWXcMO-jeW7TAJqSz





6.原来,它要活捉个兔子。。。。


Heron eats rabbit





7.然后,可能是为了消毒,把兔子按到睡里致死


Heron eats rabbit





8.洗把干净


Heron eats rabbit





9.吞


Heron eats rabbit





10.撑的2眼发直,继续卖单。


Heron eats rabbit





我的故事讲完了。





看到这里,我得澄清一下,6-10并不是我拍的在regent park的鹤,不过也真是巧,周日公园里看到鹤,第二天早上看报纸,就看到这和鹤吃兔子的报道。于是乎,我就连在一起了,娱乐一下。哈。







My photo
London, United Kingdom
twitter.com/zhengxin

Facebook & Twitter