BLOG

Quảng cáo | SEO

Reset ubuntu/ gnome settings

If you don’t have access to your graphical (GUI) desktop to delete these folders in Nautilus or you’re stuck at the login screen, drop to a terminal by hitting CTRL + ALT + F1, login to your account, and run this command:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

Get back to your GUI desktop by hitting CTRL + ALT + F7.

Login and VOILÀ! Just like the first time you ever logged into your Gnome desktop.

linuxfud.wordpress.com

Ubuntu – How to change display resolution

Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size. There are a few global options; the rest modify a particular output and follow the specification of that output on the command line.

If you want to add a mode with resolution 1024X768, you can enter the following command: $ cvt 1024 768

Sample output

# 1024×768 59.92 Hz (CVT 0.79M3) hsync: 47.82 kHz; pclk: 63.50 MHz
Modeline “1024×768_60.00″ 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync

Now you need to create a modeline

[Xem chi tiết ...]

How to change the Ubuntu login screen

First open a Terminal window (Applications -> Accessories -> Terminal) then copy+paste the following line:

sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow

Now close the Terminal window and logout, when logged out the Appearance window pops up. Here you can make the changes you want and when your done you can login as usual. To prevent the Appearance Manager from opening when you login, open a Terminal window (Applications -> Accessories -> Terminal) then copy+paste the following line:

sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

If you want to re-install the Plymouth theme run the following commands from a Terminal window,

sudo aptitude install plymouth-theme-*

Now you can run the following commands to change login and plymouth screens

sudo update-alternatives –config default.plymouth

gksu -u gdm dbus-launch gnome-appearance-properties

.st

Giúp linux khởi động nhanh hơn

Hệ điều hành Linux giờ cũng không quá xa lạ với những ai yêu thích tin học. Bài viết này giới thiệu với các bạn vài cách giúp khởi động Linux nhanh hơn.

1. Hủy bỏ những dịch vụ không sử dụng

Phụ thuộc vào chức năng của máy, nhiều dịch vụ sẽ không được sử dụng. Nếu chỉ sử dụng Linux cho PC bạn sẽ không cần đến dịch vụ gửi email, httpd, và nhiều dịch vụ khác. Nhưng nếu máy chủ của bạn là một máy chủ Web, bạn cũng có thể tắt bỏ nhiều dịch vụ. Để thực hiện thao tác này bạn có thể vào menu Administration và kiểm tra mục Services. Chỉ cần hủy chọn tất cả các dịch vụ mà bạn không muốn khởi động.

2. Hủy bỏ module kernel không cần thiết

Nếu PC kết nối Ethernet bằng dây cáp, bạn không cần phải tải module wireless kernel. Thao tác này sẽ gặp phải chút khó khăn và yêu cầu thay đổi kernel. Để thực hiện thao tác này, bạn cần phải vào nguồn kernel. Sau đó thực hiện theo các bước thay đổi kernel chuẩn. Sự khác biệt ở đây là bạn phải truy cập vào hệ thống và hủy bỏ mọi module không cần thiết.

Cách tốt nhất để phát hiện những module kernel nào hiện đã cài đặt và đang chạy trên hệ thống là cài đặt Bootchart. Phần mềm này không chỉ đưa ra một danh sách module đầy đủ, mà nó còn minh họa những gì đang xảy ra khi khởi động hệ thống. Bạn cũng có thể sử dụng lệnhchkconfig –list|grep 3:on để phát hiện những dịch vụ đang vận hành. Khi đã biết những module không cần thiết đang được tải, bạn có thể gỡ bỏ chúng trong khi thay đổi kernel. Khi thực hiện, cần thay đổi kernel cho chính xác với cấu trúc của bạn

[Xem chi tiết ...]

Tìm từ khóa cho website (P.2)

Cụm từ

Theo thói quen truy cập, phần lớn khi tìm kiếm bất kỳ một thông tin gì trên mạng, khách truy cập có thói quen nhập vào một cụm từ nhiều hơn là một từ đơn. Và phần lớn mọi người thường rút ngắn thời gian tìm kiếm bằng cách liên kết hai hay nhiều từ khoá với nhau.

Vì vậy, tôi khuyên bạn sau khi lập được danh sách các từ khoá, hãy kết nối chúng thành các cụm từ. Ví dụ, thay vì sử dụng các từ khoá Lexus hay SC400, hãy sử dụng Lexus SC400. Hay Toyota Camry, Porsche 911 Turbo, BMW 540is, Toyota 4Runner SR5 4×4…

[Xem chi tiết ...]

Tìm từ khóa cho website (P.1)

Từ khoá là một nhân tố quyết định trong việc “cải thiện” vị trí trang web của bạn trên các công cụ tìm kiếm. Chính vì vậy, bạn cần phải cân nhắc trong việc lựa chọn những từ khoá thích hợp nhất với lĩnh vực hoạt động của mình và hạn chế những rủi ro khi người truy cập tìm kiếm bạn trên các công cụ tìm kiếm. Bản tin tuần này của tôi sẽ giúp bạn lựa chọn và khắc phục những rủi ro để có được một từ khóa hiệu quả nhất cho công việc kinh doanh trực tuyến của bạn.

[Xem chi tiết ...]

JHTML date format

With the help of the following PHP date table you can add JHTML date to your code
JHTML::Date($row->date, “%A, %d. %B %Y”);
if you are modifying news then $row->date would be $this->item->created

format Description Example returned values
Day
%a An abbreviated textual representation of the day Sun through Sat
%A A full textual representation of the day Sunday through Saturday
%d Two-digit day of the month (with leading zeros) 01 to 31
%e Day of the month, with a space preceeding single digits 1 to 31
%j Day of the year, 3 digits with leading zeros 001 to 366
%u ISO-8601 numeric representation of the day of the week 1 (for Monday) though 7 (for Sunday)
%w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday)
Week
%U Week number of the given year, starting with the the first Sunday as the first week 13 (for the 13th full week of the year)
%V ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week 01 through 53 (where 53 accounts for an overlapping week)
%W A numeric representation of the week of the year, starting with the first Monday as the first week 46 (for the 46th week of the year beginning with a Monday)
Month
%b Abbreviated month name, based on the locale Jan through Dec
%B Full month name, based on the locale January through December
%h Abbreviated month name, based on the locale (an alias of %b) Jan through Dec
%m Two digit representation of the month 01 (for January) through 12 (for December)
Year
%C Two digit representation of the century (year divided by 100, truncated to an integer) 19 for the 20th Century
%g Two digit representation of the year going by ISO-8601:1988 standards (see %V) Example: 09 for the week of January 6, 2009
%G The full four-digit version of %g Example: 2008 for the week of January 3, 2009
%y Two digit representation of the year Example: 09 for 2009, 79 for 1979
%Y Four digit representation for the year Example: 2038
Time
%H Two digit representation of the hour in 24-hour format 00 through 23
%I Two digit representation of the hour in 12-hour format 01 through 12
%l (lower-case ‘L’) Hour in 12-hour format, with a space preceeding single digits 1 through 12
%M Two digit representation of the minute 00 through 59
%p UPPER-CASE ‘AM’ or ‘PM’ based on the given time Example: AM for 00:31, PM for 22:23
%P lower-case ‘am’ or ‘pm’ based on the given time Example: am for 00:31, pm for 22:23
%r Same as “%I:%M:%S %p” Example: 09:34:17 PM for 21:34:17
%R Same as “%H:%M” Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM
%S Two digit representation of the second 00 through 59
%T Same as “%H:%M:%S” Example: 21:34:17 for 09:34:17 PM
%X Preferred time representation based on locale, without the date Example: 03:59:16 or 15:59:16
%z Either the time zone offset from UTC or the abbreviation (depends on operating system) Example: -0500 or EST for Eastern Time
%Z The time zone offset/abbreviation option NOT given by %z (depends on operating system) Example: -0500 or EST for Eastern Time
Time and Date Stamps
%c Preferred date and time stamp based on local Example: Tue Feb 5 00:45:10 2009 for February 4, 2009 at 12:45:10 AM
%D Same as “%m/%d/%y” Example: 02/05/09 for February 5, 2009
%F Same as “%y-%m-%d” (commonly used in database datestamps) Example: 2009-02-05 for February 5, 2009
%s Unix Epoch Time timestamp (same as the time() function) Example: 305815200 for September 10, 1979 08:40:00 AM
%x Preferred date representation based on locale, without the time Example: 02/05/09 for February 5, 2009
Miscellaneous
%n A newline character (“\n”)
%t A Tab character (“\t”)
%% A literal percentage character (“%”)

(breathing-spring.com)

Tối ưu cấu trúc nội liên kết (internal link structure)

Cấu trúc nội liên kết của trang Web (internal link structure) cho phép bạn trỏ từ trang chủ hay các trang chính đến các trang đơn lẻ quan trọng khác trong Website.

Ví dụ: Nếu như bạn có 1000 đường link từ các trang khác trỏ tới trang chủ. Thế liên kết nói trên của trang chủ này có thể chi phối tới các trang khác trên Web.

- Từ trang chủ, bạn liên kết tới 50 trang khác thì mỗi trang đó sẽ có được 1/50 thế liên kết của trang chủ nói trên. Còn nếu bạn chỉ liên kết tới 10 trang thôi, thì đương nhiên mỗi trang sẽ nhận được nhiều thế liên kết hơn (1/10). Ghi chú rằng, việc chia sẻ thế liên kết còn phụ thưộc và vị trí và thẻ tiêu đề (h1, h2, h3…) hay định dạng văn bản (b, strong, em…).

Một trang càng nhận được nhiều thế liên kết thì trang đó càng có vị trí cao trong máy tìm kiếm.

[Xem chi tiết ...]

Fix Internet Explorer (IE) CSS bugs

The Box Model

This is perhaps the most common and frustrating bug of all in IE 6 and below. Let’s say you declare a box like this:

   div#box {
      width: 100px;
      border: 2px solid black;
      padding: 10px;
   }

IE 6 will calculate the width of the box to be 100px.
Modern browsers will calculate the width of the box to be 124px.

[Xem chi tiết ...]

Hướng dẫn đăng ký tài khoản gmail

Đăng ký tài khoản Gmail không cần xác nhận SMS

Theo cách đăng ký tài khoản mới, mã xác nhận Gmail tại VN chưa hỗ trợ cách xác minh qua SMS, buộc người dùng phải nhờ người thân ở nước ngoài xác nhận giúp. Có cách vượt qua bước này với trình duyệt Internet Explorer.

Trang web hỗ trợ của Google (Gmail) vừa cung cấp cách thức đăng ký tài khoản mới, là phải xác minh qua tin nhắn điện thoại. Mã xác nhận sẽ được gửi vào di động của người dùng.

Theo Google, việc thay đổi cách đăng ký Gmail mới để bảo vệ người dùng với thư rác (spam) và chống sự lạm dụng.

[Xem chi tiết ...]