An's Blog

Chạy theo thời cuộc.

Subscribe to RSS feed

pulseaudio in gentoo

You have to emerge alsa-plugins with pulseaudio USE flags. Otherwise alsa won't be able to talk with pulseaudio and will seize the sound devices instead.


You also need a file /etc/asound.conf with the following content:
pcm.pulse { 
     type pulse 
 } 

 ctl.pulse { 
     type pulse 
 } 


 pcm.!default { 
     type pulse 
 } 
 ctl.!default { 
     type pulse 
 }

This file force alsa to use pulse instead of seizing the sound device for itself and its subordinate.

Gnome 3, move window's close button and change toolbar style

To Move windows' close button to the left:
Use gconf-editor change key: desktop>gnome>shell>windows

To change toolbar style:
Use dconf-editor change key toolbar_style in org.gnome.desktop.interface

To change mouse cursor theme:
Use gconf-edigor to change key: /desktop/gnome/peripherals/mouse/cursor_theme
Every other workaround simply won't work, event changing the file /usr/share/icons/default/index.theme won't work.

Destiny of a tech guy.

I read PCWorld Vietnam this morning, one of a few IT - magazines in this country that seem somewhat serious about its content and don't rush for the script kiddie stuff. This month's issue features two article about three tragedy loss of the IT world this year. Steve Jobs' works were highlighted in an 8 pages long article with lots of pictures while John McCarthy and Dennis Ritchie was put together in an 2 pages only article with two faces (of them) in it, We must admit that two pages was much nicer than what other magazine would give them but that was it, only two pages.

I put an status on facebook and an - so called - iFan said that I would not understand because I don't use iProduct. Then it strike me, what we, future engineer and scientist of this country, was destined to?

We who committed this techy path is following the footstep of McCarthy and Ritchie, let's be known that may be not a single one of us will ever be able to accomplish as great a job as what they did. But even if we will we was destined to be poorer than Bill and Steve, to be inferior as a public figure, to be less missed when we pass away. Be sad as much as you want, but that was what destiny await us and we can't change that. For Steve to be able to bring iPhone to the world, many engineers spent many sleepless night working hard. I doubt any iFan could remember the name of any of those engineers.

The destiny is settled, but what we can change is our attitude. Let us all aware that we are the one who made the whole things possible. Unix set the standard for modern operating system and almost every operating system was written in C or its variants. Without McCarthy and Ritchie there will be no Windows, no MacOS, no iOS, no linux, no android, no anything. They are great man and they will be missed, at least among the rank of engineer and scientist they will be missed.

There are great heroes, but the greatest hero is the one who doesn't have our recognition.

2011-09-23

Đêm thì vắng, code thì khó, người rảnh rỗi, sinh nông nổi, viết lôi thôi.


Ngoại ơi!
Hôm giỗ ngoại con có về! Khách khứa đông lắm ngoại, nhưng mà chắc ngoại ở trên kia cũng thấy rồi. Có điều giỗ này không thoải mái như mấy giỗ xưa, tới khi cúng xong con mới về, khách khứa vào mâm, người nhà thì bận rộn, con đứng giữa nhà mà thấy mình sao xa lạ lắm ngoại.
Trời mưa rồi, hôm đám giỗ ngoại cũng mưa, mưa rỉ rả suốt cả ngày dài, buồn não ruột. Hôm đó con Bòn em kêu con chỉ nó làm tập làm văn, đề là viết thư cho ông bà, con tính viết luôn thư cho ngoại để nó làm mẫu luôn, không hiểu sao lúc đó nhiều cảm nghĩ nhưng lại chẳng viết được gì. Tới hôm nay mới đặt phím gõ được mấy dòng này, đúng là làm cái gì chỉ để khoe mẽ với người khác thì khó mà thành được ha ngoại.
Mẹ được 30 năm tuổi Đảng rồi ngoại, có huy hiệu với một lẵng hoa to tướng. Tiếc là không được ra Hà Nội, tổ chức gấp gáp quá mẹ không sắp xếp kịp, vướng anh Hai sad. Con nhìn không thấy mẹ buồn nhưng chắc là mẹ tiếc lắm, đời người có một lần 30 năm tuổi Đảng thôi chứ mấy. Con cũng thấy tiếc, nhưng sâu trong tâm con có một chút mừng vì không phải vắng mẹ mất 1 tuần, có vẻ con vẫn còn ích kỷ quá.
Ngoại bao nhiêu tuổi Đảng rồi ngoại nhỉ? Nhớ hồi ngoại được huy hiệu 50 năm tuổi Đảng, ngoại kể với mẹ, mẹ mừng ra mặt, nhưng sao lần đó con không nhớ là có thấy ngoại vui? Ngoại với mẹ nói chuyện gì đó xa lạ lắm con chẳng nhớ nỗi là chuyện gì, cũng chẳng nhớ nỗi chính xác là năm nào nữa và con cũng không nhớ là bắt gặp ngoại cười trong lần đó! Trí nhớ con kém quá hay hồi đó con nhìn nét mặt người khác còn kém quá hay thật sự khi số tuổi Đảng đã quá cao người ta không còn mừng vui với những điều ấy nữa?
Bây giờ con tốt nghiệp rồi ngoại, chưa chính thức nhưng cũng bảo vệ xong rồi. Chuyện Đảng chuyện đời chắc con cũng không còn ngây thơ như trước, không biết bây giờ nếu con hỏi ngoại về dịp 50 năm tuổi Đảng trước đây không biết ngoại sẽ nói những gì? Ngày xưa con chẳng bao giờ hỏi ngoại chuyện ấy, cũng chẳng nghĩ tới việc sẽ hỏi, mà thực ra ngày xưa con cũng chẳng dám hỏi ngoại chuyện gì. Bây giờ muốn hỏi thì... trễ 3 năm rồi ngoại nhỉ sad

Download a whole site (mirroring) with wget

Pretty neat trick:

Downloading an Entire Web Site with wget
Sep 05, 2008 By Dashamir Hoxha
in

HOW-TOs

If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the
job—for example:

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.website.org/tutorials/html/


This command downloads the Web site www.website.org/tutorials/html/.

The options are:

--recursive: download the entire Web site.

--domains website.org: don't follow links outside website.org.

--no-parent: don't follow links outside the directory tutorials/html/.

--page-requisites: get all the elements that compose the page (images, CSS and so on).

--html-extension: save files with the .html extension.

--convert-links: convert links so that they work locally, off-line.

--restrict-file-names=windows: modify filenames so that they will work in Windows as well.

--no-clobber: don't overwrite any existing files (used in case the download is interrupted and
resumed).

Some times we will have to add
-e robots=off

Chỉnh address book google tạo bằng online account trong gnome 3.2 làm treo evolution

Có thể tạo addressbook google được nhưng đừng chọn một option nào cho nó cả nếu không khi khởi động lại máy và check mail evolution sẽ bị đơ.

Hiển thị hình ảnh người gửi email trong evolution:

To make display the photograph of the sender in message header, do the following:


Photograph Message Headers

The photograph of the sender of an email can be shown at the right side of the message preview if the sender is in one of your address books and has a photograph.

To enable this functionality, select Edit ▸ Preferences ▸ Mail Preferences ▸ Headers ▸ Show the photograph of sender in the message preview.

By default only local address books are used for searching the photograph as accessing remote address books can cause delays. You can disable this by deselecting the option Search for sender photograph only in local address books.

If there are multiple matches for a contact, the first one is always used.

Mộng

Khi nãy buồn ngủ mà giờ thì tỉnh như con sáo sậu. Ngồi thì buồn ngủ mà nằm thì tỉnh, thật là khó hiểu. Cái chu kỳ một buồn một vui lại ứng nghiệm, ôi ta buồn vời vợi làm sao. Mẫu giáo trường xịn, cấp một trường thường, cáp 2 trường nhất nhì trong quận, cấp 3 trường nhất nhì quận từ dưới đếm lên, lên được đại học quốc gia, tới khi bảo vệ điểm thấp nhất lớp. Cái đồ thì hình sin này uốn lượn tựa mây khói, mà sao linh ứng thật nhỉ, đời lên lên xuống xuống bất thường. Ngẫm nghĩ thử nguyên nhân là gì nhưng ngẫm không ra được, chỉ còn biết trách chính mình. Mơ mơ mộng mộng, mộng cao mộng ảo, thực tế lắm khi như mộng, lắm khi phủ phàng hay là tất cả đều như mộng?

Cái cảm giác đứng trước một thử thách lớn thật là khó tả, từ lúc thi đại học tới giờ, nhưng mà sao khác quá lần này phũ phàng quá, lần trước như một cơn mộng, lần như như tỉnh cơn mộng, tiếc rằng... tỉnh trễ quá.


Gá thân mộng,
Dạo cảnh mộng,

Mộng tan rồi,
Cười vỡ mộng.

Ghi lời mộng,
Nhắn khách mộng,

Biết được mộng,
Tỉnh cơn mộng.
That was tough. When something long seemed to be ok turn bad and became worse in the very last minutes, the world seem to turned up side down. Everything is reasonable, everything is understandable. It's just that the bad had been compressed for a time too long that when it's leaked, it busted out so fast for me to handle.

Too much self confident plus too much reliance on other people plus too much underestimating of the hard work life will throw. All those stuff together will leave you just steps away from oblivion.

You are not as good as guessing other people's altitude as you thought you were. Face it! you are growing up, things is not what it seems to be. No one will be there to help you out when you are down. Life is tough! Stand up, sit down, lying flat or any other posture, it will fuck you. It's your rights to choose the position.

The lowest 8, this will be hard to swallow.

Linux and hibernation

Yes, linux support "Suspend to disk" A.K.A "Hibernate" as windoze call it. But if your linux distro don't support it? You will have to install an utility call pm-ultils
Consult the arch wiki for configuration and trouble shooting: https://wiki.archlinux.org/index.php/Pm-utils
February 2012
M T W T F S S
January 2012March 2012
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29