Friday, November 20, 2009

Enable Mod Rewrite on WAMPSERVER

You need to enable Mod Rewrite in order to use pretty permalinks in WordPress or Clean URLs in Drupal.

However, WAMPSERVER does not enable Mod Rewrite by default.

To enable Mod Rewrite,
  1. Click on the WAMPSERVER icon in the system tray, and choose Apache.
  2. Click on Apache modules.
  3. Click on the down triangle until you see rewrite_module. Click to enable it.
  4. Restart All Services.
Figure 1 shows the steps graphically.

Figure 1: Steps to enable Rewrite Module on WAMPSERVER 




Thursday, November 19, 2009

How to use CSS to style code snippets

It is easy to use CSS to style code snippets, as shown in Figure 1.

[caption id="attachment_2836" align="alignnone" caption="Figure 1: Sample output of CSS style for code snippets"]Figure 1: Sample output of CSS style for code snippets[/caption]


Step 1: Append this code inside a style sheet.


pre{ font-size:12px; background:#fff; border:1px solid #000; line-height:20px; width:600px; overflow:auto; overflow-y:hidden; margin:0; padding:0; } pre code{ font-family:Monaco,Courier; display:block; margin:0 0 0 40px; padding:18px 0; } 

Step 2: Put the code snippets inside <pre> and <code> tags.


<pre><code>def f(): txt = "Some sample code" return txt </code></pre>

3 free online resources to help you learn Linux commands

These websites should provide you with the basic (up to advance) command line skills, as well as teach you some neat command line tricks.

1. LinuxCommand.org




LinuxCommand.org is a Linux education and advocacy site devoted to helping users of Linux operating systems.

Visit LinuxCommand.org.

2. Linux Command Directory



Linux Command Directory is a directory of 687 Linux commands with descriptions.

Visit Linux Command Directory.

3. The Linux Cookbook



The Linux Cookbook presents "recipes" for preparing or accomplishing a particular, specific thing.

Visit The Linux Cookbook.

Windows Media Player 11 download

Windows Media Player 11 is the latest release of Microsoft's video and audio player that can rip CDs and play videos/DVDs.

Windows Media Player 11
Requirement: Windows XP with Service Pack 2 (SP2) installed.

Download Windows Media Player 11 (23Mb)

Saturday, November 14, 2009

Windows Live offline installer

Windows Live Writer
This is the complete standalone version of Windows Live. The complete standalone package of Windows Live includes options to install Live programs such as Messenger, Live Mail, Live Writer and Live Photo Gallery.

Click here to download the standalone version (offline installer) of Windows Live.

Note: Windows Live Movie Maker will not run on Windows XP.

Last updated on July 7, 2011.

Thursday, November 5, 2009

Ubuntu: Restore panels to default settings

How to restore panels on Ubuntu?

Step 1:


Delete current panel settings.
rm -rf ~/.gconf/apps/panel

Step 2:


Restart the Gnome panel.
pkill gnome-panel
As an alternative, just restart the computer.

Monday, October 26, 2009

Change file format (Dos/Unix) in Vim

Unix and dos (Windows) use different file format. Even though the latest Vim can detect the file format automatically, sometimes you also need to convert your file to the other format, especially if you are sharing the file with your friends.

Fortunately, in vim you can set the file format using a very simple command.

Change the file format to dos

:set ff=dos

Change the file format to unix

:set ff=unix

Note:

You can also add those commands in .vimrc file to make Vim starts with the desired format of file.